News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

How to overlap controls and indicate different z-orders ?

Started by eranon, May 11, 2012, 02:06:24 AM

Previous topic - Next topic

eranon

I've to manage a wxTextCtrl + a wxHtmlWindow + a wxStaticText, both at same place, but appearing in different circumstances. So, my first though was to simply place these three controls (or items/components in the wxSmith vocabulary, if I've well understood) in the wxFrame with different z-orders... But, how to manage this in CodeBlocks using wxSmith ? Is it possible, knowing sizers seems to avoid any controls overlapping ? Does wxFormBuilder better in this field (never used it, I'm using C::B + wxWidgets recently) ?
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]

oBFusCATed

Place them in vertical sizer, set the borders to 0 and show/hide the controls as needed.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

eranon

OK, understood the concept (sizer will take care of position according to visibility). Thanks oBFusCATed !

-
EDIT : another way (better if it's not to just manage two or three items but several overlapped layouts) is to go through wxNotebook w/o tabs as explained here : http://stackoverflow.com/questions/8398535/wxsmith-a-good-way-to-manage-wxpanel.
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]