Author Topic: Sizers  (Read 3817 times)

Offline jmccay

  • Almost regular
  • **
  • Posts: 202
Sizers
« on: November 02, 2006, 03:50:32 am »
Build: 3126 / WInXp / gcc 3.4.5 / Unicode

I am trying to allow a space around the edges of my dialog before the edge of the dialog.  Currently, I am using FlexGridSizer with 10 spacers on 4 * 6 grid.  Is there a better way to do it?  Maybe with code instead of completely relying on wxSmith.

jmccay
OS: WinXP, Win98 SE, & sometimes Linux

a little light reading from the wxWidgets 2.6.2 readme: A detailed 2000-page reference manual is supplied in HTML, PDF and Windows Help form: see the docs hierarchy.

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Sizers
« Reply #1 on: November 02, 2006, 04:12:50 am »
You need to investigate padding.  The dialog has a root sizer, to this root sizer and another sizer which has the padding you desire.  Then add the rest of your controls to this sizer, not the root one.

Offline jmccay

  • Almost regular
  • **
  • Posts: 202
Re: Sizers
« Reply #2 on: November 05, 2006, 02:23:35 am »
You need to investigate padding.  The dialog has a root sizer, to this root sizer and another sizer which has the padding you desire.  Then add the rest of your controls to this sizer, not the root one.

     I am not completely sure what you mean by padding.  I thought that is what I was doing with the flexgrid & the spacers?  I am using wxSmith, & I don't see a way to set the padding using properties.  Or are you talking about the border size of the elements added to the sizer?  Or did you mean to embed a sizer inside of another sizer?  I think this is what you mean, and then you can set the border value of the inner sizer.  I guess you meant to say "to this root sizer a[d]d another sizer" instead of "to this root sizer and another sizer".

     The second one seems to work the best.  That is better than using 10 spacers!  Thanks.  I didn't think of that.
jmccay
OS: WinXP, Win98 SE, & sometimes Linux

a little light reading from the wxWidgets 2.6.2 readme: A detailed 2000-page reference manual is supplied in HTML, PDF and Windows Help form: see the docs hierarchy.

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Sizers
« Reply #3 on: November 05, 2006, 07:46:58 am »
Yes I meant "add" not "and", despite my bad English (I am American) I still managed to get the point across.  I am glad it was helpful.

Offline jmccay

  • Almost regular
  • **
  • Posts: 202
Re: Sizers
« Reply #4 on: November 06, 2006, 02:52:44 am »
Nah...it was not bad English.  Just bad proof reading, and we all do it.  It happens.  Thanks again.
jmccay
OS: WinXP, Win98 SE, & sometimes Linux

a little light reading from the wxWidgets 2.6.2 readme: A detailed 2000-page reference manual is supplied in HTML, PDF and Windows Help form: see the docs hierarchy.