Default vertical position of control after wxRadioBox

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Default vertical position of control after wxRadioBox

Tim Burgess-5



I find that, if I construct a dialog using -1 for all control sizes and positions, things give me a workable layout with one exception. The exception is where I add a control after a wxRadioBox. What happens in this case is that the control created immediately after the wxRadioBox is vertically positioned to line up with the last button within the wxRadioBox. I can see why this is the case, but want to have the following control line up with the first item in the radiobox (or should it be with the radiobox’s label). I tried:


int myY = XRCCTRL(*this, "myRadioBox", wxRadioBox)->GetPosition().y;

              XRCCTRL(*this, "myStaticText", wxStaticText)->SetPosition( wxPoint( -1, myY));


However, this positions the static text control at the same Y coordinate as the second button, not the first.


Where am I going wrong, please?


Best wishes.


Tim Burgess

Raised Bar Ltd.

E: [hidden email]

M: +44 (0)7989 486976


Please read before posting.
To unsubscribe, send email to [hidden email]
or visit