[Gambas-user] Bug inTabStrip control

Benoît Minisini gambas at ...1...
Mon Jul 13 11:51:00 CEST 2009


> follow my example to emulate the bug .
>
> 1 create a form
> 2. drag and drop a tabstrip control to the form
> 3. set the count to 3 , it will create 3 tab
> 4. add a button to tab1
> 5. at form _open() event add the following code
>     '  only left tab1 visible , hide the rest
>
>     tabstrip1[1].visible = true
>     tabstrip1[2].visible = false
>
>
> 6. at button click event add the following code
>     'hide tab1 and tab3
>     tabstrip1[0].visible = false
>     tabstrip1[1].visible = true
>     tabstrip1[2].visible = false
>
> try to run
> on the form show only one tab (name tab1) with a button in it . click on
> the button . the tab change to tab2 but the button still showing .
> the button should not show up since button is belong to tab1 not tab2 .
>
> work around ? on the button click event ,
> ' must set all tab visible first
>     tabstrip1[0].visible = true
>     tabstrip1[1].visible = true
>     tabstrip1[2].visible = true
>
>     tabstrip1.index = 1
>
>     tabstrip1[0].visible = false
>     tabstrip1[1].visible = true
>     tabstrip1[2].visible = false
>
> this way the button won't show up in tab2 .

Which version of Gambas do you use? Do you use gb.qt or gb.gtk?

-- 
Benoît




More information about the User mailing list