noob: organizing input fields in wxpython dialogs
Question: I am new to wxpython so this may be a pretty easy question, I dunno.

I want to have a dialog box pop up that takes user input. Check. I want
multiple user input fields. Check. I also want to have them come up in the
same line, e.g.:

Enter the Month: _x_ Enter the Day: _x_ Enter the Hour: _x_

etc... rather than have them each take new lines. So if I have code like this
(copied from some tutorial):

    
    
    import wx
    
    class TextFrame(wx.Frame):
        def __init__(self):
            wx.Frame.__init__(self, None, -1, 'Text Entry Example', size=(300, 100))
            panel = wx.Panel(self, -1) 
            basicLabel = wx.StaticText(panel, -1, "Basic Control:")
            basicText = wx.TextCtrl(panel, -1, "I've entered some text!", size=(175, -1))
            basicText.SetInsertionPoint(0)
            pwdLabel = wx.StaticText(panel, -1, "Password:")
            pwdText = wx.TextCtrl(panel, -1, "password", size=(175, -1),style=wx.TE_PASSWORD)
            sizer = wx.FlexGridSizer(cols=2, hgap=6, vgap=6)
            sizer.AddMany([basicLabel, basicText, pwdLabel, pwdText])
            panel.SetSizer(sizer)
    
    app = wx.PySimpleApp()
    frame = TextFrame()
    frame.Show()
    app.MainLoop()
    

How would I make it so that the "basic control" and "password" fields appeared
on the same line?


Answer: If you want all the widgets on the same line, then change the number of
columns for your sizer from 2 to 4. Or use a horizontally oriented box sizer.

