[wxPython-users] TayLayout

Christopher Barker Chris.Barker at noaa.gov
Mon Feb 12 15:33:34 PST 2007


Davy Mitchell wrote:

> My simple query is, would it be worth writing a wxPython version of 
> Taylayout?

Yes. Some kind of "flow" Sizer has been asked for numerous times.

One question:

> Items are added in a L to R fashion until you specify that a new line
> is required.

How do you specify that? In fact, if you need to specify it, then you 
might as well use one of the grid sizers. I'd rather see the newline 
calculated according to how much space there is available.

 From your blog, in which I don't see the line breaks specified:

    def __init__(self):
         Form.__init__(self)
         self.ALayout = TayLayout()
         self.ALayout.parent = self

         self.textbox = self.ALayout.addNewTextBox("The Default 
Text",True,150,0)
         self.label = self.ALayout.addNewLabel("StarGate")
         self.piccy = self.ALayout.addNewPictureBox("title.gif", True, 
244, 88)
         self.button1 = self.ALayout.addNewButton("Press Me")
         self.button2 = self.ALayout.addNewCheckBox("Some option")
         self.button3 = self.ALayout.addNewButton("OK", False)
         self.button4 = self.ALayout.addNewButton("Cancel", False)
         self.button5 = self.ALayout.addNewButton("Apply", False)

         # Finally set the size of the Form.
         self.ALayout.Complete()

-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov




More information about the wxpython-users mailing list