Sorry if this is in the wrong thread, I haven't been here in a long time.
Hi, I'm having a hard time in trying to position my wx.StaticText and wx.TextCtrl so that it's not stuck at the very top and very left. Life so
Here is the code
import sqlite3
import sys
import os
import wx
class add (wx.Frame):
def __init__(self, parent, id):
wx.Frame.__init__(self, parent, id, '', size=(660,450), style=wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.CAPTION | wx.CLOSE_BOX | wx.CLIP_CHILDREN)
self.panel = wx.Panel(self)
self.Centre()
fnameLabel = wx.StaticText(self.panel, -1, 'First Name: ')
self.fname = wx.TextCtrl(self.panel, -1, "", size=(200, -1))
fnameLabel.SetFont(wx.Font (10, wx.SWISS, wx.NORMAL, wx.BOLD))
self.fname.SetInsertionPoint(0)
#Create sizer
sizer = wx.FlexGridSizer(cols = 2 , hgap = 4, vgap = 10)
sizer.AddGrowableCol(1)
sizer.Add(fnameLabel, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL)
sizer.Add(self.fname, 0)
sizer.Add((50,50))
self.panel.SetSizer(sizer)
if __name__=='__main__':
app = wx.App()
frame = add(parent = None, id = -1)
frame.Show()
app.MainLoop()
Thanks in advance for any and all your help.