Author Topic: How to overlap controls and indicate different z-orders ?  (Read 4167 times)

Offline eranon

  • Almost regular
  • **
  • Posts: 180
How to overlap controls and indicate different z-orders ?
« on: May 11, 2012, 02:06:24 am »
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"]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: How to overlap controls and indicate different z-orders ?
« Reply #1 on: May 11, 2012, 09:43:05 am »
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!]

Offline eranon

  • Almost regular
  • **
  • Posts: 180
Re: How to overlap controls and indicate different z-orders ?
« Reply #2 on: May 11, 2012, 12:23:27 pm »
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.
« Last Edit: May 11, 2012, 02:21:32 pm by eanon »
[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"]