adding Staticline to a sizer.

used the “wxpython in action” chapter 11 example as a base to build on and
learn a little
more of using sizers. In the book script (listing 11.11) the first two
objects displayed are part of the
mainSizer and display as expected.
However, I also wanted to add a wx.StaticLine past the FlexGridSizer and not
clear on how/where it should be entered and I think it belongs in the
BoxSizer- horizontal sizer.

Question: To accomplish this do I need/have to set an additional Box
sizer-Horizontal and then add it to the vertical sizer (mainSizer )in the
code ?

I attached the complete file so as not to leave anything out that hopefully
will illuminate my question.

In the panel that is the display, I wanted to add the StaticLine to separate
the last three labels/Text Ctrl's. I commented where I thought it should be
coded..... I will also include a graphic of the screen.

<http://wxpython-users.1045709.n5.nabble.com/file/n5721020/staticLine.png>
NewGasChk.py
<http://wxpython-users.1045709.n5.nabble.com/file/n5721020/NewGasChk.py> I

···

--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/adding-Staticline-to-a-sizer-tp5721020.html
Sent from the wxPython-users mailing list archive at Nabble.com.

Figured it out on my own.

···

--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/adding-Staticline-to-a-sizer-tp5721020p5721055.html
Sent from the wxPython-users mailing list archive at Nabble.com.

It looks like it is in a vertical stack in that image, so I would say you should use a BoxSizer(wx.VERTICAL), then add your widgets to that, then the static line, then more widgets.

···

On Saturday, May 10, 2014 3:18:19 PM UTC-7, EightBits wrote:

used the “wxpython in action” chapter 11 example as a base to build on and

learn a little

more of using sizers. In the book script (listing 11.11) the first two

objects displayed are part of the

mainSizer and display as expected.

However, I also wanted to add a wx.StaticLine past the FlexGridSizer and not

clear on how/where it should be entered and I think it belongs in the

BoxSizer- horizontal sizer.

Question: To accomplish this do I need/have to set an additional Box

sizer-Horizontal and then add it to the vertical sizer (mainSizer )in the

code ?

I attached the complete file so as not to leave anything out that hopefully

will illuminate my question.

In the panel that is the display, I wanted to add the StaticLine to separate

the last three labels/Text Ctrl’s. I commented where I thought it should be

coded… I will also include a graphic of the screen.

<http://wxpython-users.1045709.n5.nabble.com/file/n5721020/staticLine.png>
NewGasChk.py

<http://wxpython-users.1045709.n5.nabble.com/file/n5721020/NewGasChk.py> I

View this message in context: http://wxpython-users.1045709.n5.nabble.com/adding-Staticline-to-a-sizer-tp5721020.html

Sent from the wxPython-users mailing list archive at Nabble.com.