Custom "wxStaticBoxSizer" (sorts of)
Posted: Thu Nov 22, 2012 12:06 am
Hi,
I'm in the need of drawing something more sophisticated around a group of widgets (and using a custom background, too). Not only a border and a label (if so, I'd be just using a wxStaticBoxSizer). The widgets themselfes are inside of a wxGridSizer. I can attach this to a derived wxPanel and everything is fine so far... only this: the panel then has exactly the size of the grid-sizer...
This may be a stupid question, but is there another way of telling the derived wxPanel that it should be bigger then the sizer it contains? Or do I have to add additional sizers to the "base"-sizer to achieve this? While I certainly can do it like that, I'd prefer some way which is more like add (say) 16 px to the top and 4 px to every other border of the panel avoiding the "more-sizers"-solution. I'm a little bit lost with this...
best,
Stefan
I'm in the need of drawing something more sophisticated around a group of widgets (and using a custom background, too). Not only a border and a label (if so, I'd be just using a wxStaticBoxSizer). The widgets themselfes are inside of a wxGridSizer. I can attach this to a derived wxPanel and everything is fine so far... only this: the panel then has exactly the size of the grid-sizer...
This may be a stupid question, but is there another way of telling the derived wxPanel that it should be bigger then the sizer it contains? Or do I have to add additional sizers to the "base"-sizer to achieve this? While I certainly can do it like that, I'd prefer some way which is more like add (say) 16 px to the top and 4 px to every other border of the panel avoiding the "more-sizers"-solution. I'm a little bit lost with this...
best,
Stefan