Win32lib bug - Checkboxes become visible inside TabItems.

new topic     » topic index » view thread      » older message » newer message

Hi,

I've found a bug with the handling of the visibility of checkboxes. If a checkbox is created inside a TabItem control and set to invisible. Then if the user switches to another TabItem and returns to the first then the checkbox becomes visible. Also if the invisible checkbox is on a TabItem other than the initial one then it'll be visible as soon as the user visits the tab.

I think the problem is that the visibility status of a checkbox is being turned on when the user changes tab.

In my test case I found that checkboxes inside a group do not exhibit the same problem on v0.70.4 or v0.70.19 of the Win32Lib library. In v0.60.6 of the library I found that all of the checkboxes inside a TabItem are always visible, so I think some improvements to this area of the code have already been made.

I've created a test case below which I hope will suitably demonstrate the problem.

--  code generated by Win32Lib IDE v1.0.4 Build July-06-2008 
 
constant TheProgramType="exw"  
  
-- include Win32Lib.ew 
include "C:/EUPHORIA/win32lib_v0.70.19/Include/Win32Lib.ew" 
without warning 
 
-------------------------------------------------------------------------------- 
--  Window Window1 
constant Window1 = createEx( Window, "Demo of naughty checkboxes", 0, Default, Default, 394, 494, 0, 0 ) 
constant TabControl7 = createEx( TabControl, "TabControl7", Window1, 72, 176, 220, 192, 0, 0 ) 
constant TabItem8 = createEx( TabItem, "Tab1", TabControl7, 0, 0, 0, 0, 0, 0 ) 
constant Group2 = createEx( Group, "There's a checkbox in here", TabItem8, 16, 36, 190, 60, 0, 0 ) 
constant CheckBox3 = createEx( CheckBox, "CheckBox3", Group2, 24, 24, 148, 20, 0, 0 ) 
setVisible( CheckBox3, w32False ) 
constant CheckBox4 = createEx( CheckBox, "CheckBox4", TabItem8, 40, 156, 148, 20, 0, 0 ) 
setVisible( CheckBox4, w32False ) 
constant TabItem39 = createEx( TabItem, "Tab2", TabControl7, 0, 0, 0, 0, 0, 0 ) 
constant Group40 = createEx( Group, "There's a checkbox in here", TabItem39, 16, 36, 190, 60, 0, 0 ) 
constant CheckBox1 = createEx( CheckBox, "CheckBox1", TabItem39, 40, 128, 148, 20, 0, 0 ) 
setVisible( CheckBox1, w32False ) 
constant CheckBox2 = createEx( CheckBox, "CheckBox2", Group40, 24, 24, 148, 20, 0, 0 ) 
setVisible( CheckBox2, w32False ) 
constant LText45 = createEx( LText, "Handling of whether a checkbox is visible or not is affected by it being inside a TabItem. All the checkboxes in this example are set to setVisible(cb,w32False). Initially on Tab2 you won't see any checkboxes. Switch to Tab1 and you'll see one, then switch back to Tab2 and one will appear. The act of switching tab seems to override the original setVisible setting. You'll also notice that the checkboxes inside the group control remain invisible.", Window1, 24, 20, 308, 140, 0, 0 ) 
constant CheckBox7 = createEx( CheckBox, "CheckBox7", Window1, 76, 416, 148, 20, 0, 0 ) 
setVisible( CheckBox7, w32False ) 
constant LText47 = createEx( LText, "There's a checkbox below here", Window1, 72, 388, 240, 20, 0, 0 ) 
constant LText57 = createEx( LText, "There's a checkbox below here", TabItem8, 20, 104, 180, 20, 0, 0 ) 
constant LText58 = createEx( LText, "There's a checkbox below here", TabItem39, 20, 104, 180, 20, 0, 0 ) 
--------------------------------------------------------- 
--------------------------------------------------------- 
 
 
WinMain( Window1,Normal ) 



Is there any chance someone can fix this for me please?

All the best,
Cheers,
Mark

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu