Hi,
I have a dialog(Frame) which I use to log into an application (code supplied below). I have changed so that I use the wxFlexGridSizer. It seems to work, however I seem to have lot the possiblity to step to next control (edit area) by using the TAB key. Any hints how to get this feature back.
Also is it possible to set the background color of the frame (say to white) ?
Thanks for any help.
Nikolai Kirsebom
class LoginFrame(wxFrame):
def __init__(self, parent, id, title, fw):
self.Fw = fw
# First, call the base class' __init__ method to create the frame
wxFrame.__init__(self, parent, id, title) #, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL )
EVT_CLOSE(self, self.OnCloseWindow)
gs = wxFlexGridSizer(4, 2, 10, 5) # rows, cols, hgap, vgap
self.Dsn = wxTextCtrl(self, -1, fw.Dsn, wxPoint(4, 4), wxDefaultSize, wxTE_READONLY)
self.User = wxTextCtrl(self, -1, fw.UserName)
self.Password = wxTextCtrl(self, -1, "", wxPoint(4, 4), wxDefaultSize, wxTE_PASSWORD)
gs.AddMany(
[(wxStaticText(self, -1, LU_T("Database")), 0, wxEXPAND),
(self.Dsn, 0, wxEXPAND),
(wxStaticText(self, -1, LU_T("User")), 0, wxEXPAND),
(self.User, 0, wxEXPAND),
(wxStaticText(self, -1, LU_T("Password")), 0, wxEXPAND),
(self.Password, 0, wxEXPAND),
(wxButton(self, wxID_OK, LU_T("Ok")), 0, wxALIGN_BOTTOM | wxALIGN_LEFT),
(wxButton(self, wxID_CANCEL, LU_T("Cancel")), 0, wxALIGN_BOTTOM | wxALIGN_RIGHT),
])
gs.AddGrowableCol(1)
self.sizer = gs
self.sizer.Fit(self)
self.SetAutoLayout(true)
self.SetSizer(gs)
EVT_BUTTON(self, wxID_OK, self.OnOk)
EVT_BUTTON(self, wxID_CANCEL, self.OnCancel)
···
_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users