superimposed GroupBox

Hello,
When groupboxes (4) are superimposed, except the first GroupBox.caption, others becomes Bold, any solution ?
Code is attached to this msg.
link text

What Platform are you on? Which version of Xojo are you using?

win 7 (64bits), xojo 2015r1.

Is this undefined behaviour, perhaps? You can’t put a PagelPanel on a PagePanel, for example, perhaps this applies to groupboxes too?

Can any of these controls overlap each other?

Have you tried a newer version of Xojo to see if it’s fixed?

in this case i must move to a newer version ?

Unfortunately the latest ver. 2018r4 worsened the problem.
GroupBox.caption is “overlapped” and bold still present.

This is on the IDE only, not on compiled.

Also: why don’t you set the other three GroupBox to invisible since you only want to get one visible ?

At design time, set all invisible (once the window design is tested and over).
At run, set GroupBox1 to Visible,
then when you change the GroupBox(s) visibilities to only show the asked one (and set/keep the others invisibles).

Nota: the GroupBox Captions are empty (no Caption); you set a Label instead.

[quote=430894:@Emile Schwarz]This is on the IDE only, not on compiled.

Also: why don’t you set the other three GroupBox to invisible since you only want to get one visible ?

At design time, set all invisible (once the window design is tested and over).
At run, set GroupBox1 to Visible,
then when you change the GroupBox(s) visibilities to only show the asked one (and set/keep the others invisibles).

Nota: the GroupBox Captions are empty (no Caption); you set a Label instead.[/quote]

Yes it’s only in the IDE i do not tested it when compiled.
The properties grpbox.visible in each case (0 to 3) are setted (code) to run properly the call or recall any grpbox, otherwise is desorder.
May be you have any idea, the code is posted with this conversation.

Hi Djamel, I think the overlapping is not your biggest problem. I downloaded your code and it looks like GB2 is inside GB1 (see the red square that appears when you select it), GB3 inside GB2 and GB4 inside GB3, when I run your project it looks like this:

The IDE is to help you design your app but in some cases the representation is not the same as the actual application.

instead of multiple “groupboxes” why not use one pagepanel?

[quote=430925:@Alberto De Poo]Hi Djamel, I think the overlapping is not your biggest problem. I downloaded your code and it looks like GB2 is inside GB1 (see the red square that appears when you select it), GB3 inside GB2 and GB4 inside GB3, when I run your project it looks like this:

The IDE is to help you design your app but in some cases the representation is not the same as the actual application.[/quote]
link text

Hello Dave,
i am migrating from vb6 to xojo, i have used a “frame” in vb6, groupbox is equivalent.

I get “Sorry, we couldn’t find that page” from that link.

I did too, but I’m a curious explorer :slight_smile: https://vimeo.com/327351969

link text this link runs properly from my PC.
I will try to use an other way.

[quote=430939:@Djamel AIT AMRANE]link text

Djamel, please right clic on GB2 and select ‘Unparent’, do the same with GB3 and GB4, then change your code to only show the GB you selected, for example change:

elseif Cbox.ListIndex =1 then GB1.visible= true GB2.visible=true GB3.visible = false GB4.visible= false
to

elseif Cbox.ListIndex =1 then GB1.visible= false GB2.visible=true GB3.visible = false GB4.visible= false
the same for listindex 2 and 3.

With those changes, running on Windows 7 and Xojo 2018r3 it worked without issues.

[quote=430941:@Alberto De Poo]Djamel, please right clic on GB2 and select ‘Unparent’, do the same with GB3 and GB4, then change your code to only show the GB you selected, for example change:

elseif Cbox.ListIndex =1 then GB1.visible= true GB2.visible=true GB3.visible = false GB4.visible= false
to

elseif Cbox.ListIndex =1 then GB1.visible= false GB2.visible=true GB3.visible = false GB4.visible= false
the same for listindex 2 and 3.

With those changes, running on Windows 7 and Xojo 2018r3 it worked without issues.[/quote]

With GB2,GB3,GB4 visible set to off.link text

[code if Cbox.ListIndex = 0 then
GB1.visible=true
GB2.visible=false
GB3.visible=false
GB4.visible=false

GB1.Caption ="N° 1 "

elseif Cbox.ListIndex =1 then

GB1.visible= false
GB2.visible=true
GB3.visible=false
GB4.visible=false

GB2.caption= "N° 2 "

elseif Cbox.ListIndex =2 then

GB1.visible= false
GB2.visible=false
GB3.visible=true
GB4.visible=false

GB3.caption="N° 3 "

elseif Cbox.ListIndex =3 then

GB1.visible= false
GB2.visible=false
GB3.visible=false
GB4.visible=true

GB4.Caption ="N° 4 " 

end if][/code]

You need to “unparent” GB2, GB3 and GB4

Your code has GB2 ‘inside’ GB1, so when you set GB1.Visible=False and GB2.Visitble=True, GB1 is not visible and GB2 is a ‘child’ of GB1 so it doesn’t show. You ‘unparent’ GB2 from GB1, then GB2 can be visible on it’s own.