]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-07/text_ctrl.py
   3 class TextFrame(wx
.Frame
): 
   6         wx
.Frame
.__init
__(self
, None, -1, 'Text Entry Example',  
   8         panel 
= wx
.Panel(self
, -1)  
   9         basicLabel 
= wx
.StaticText(panel
, -1, "Basic Control:") 
  10         basicText 
= wx
.TextCtrl(panel
, -1, "I've entered some text!",  
  12         basicText
.SetInsertionPoint(0) 
  14         pwdLabel 
= wx
.StaticText(panel
, -1, "Password:") 
  15         pwdText 
= wx
.TextCtrl(panel
, -1, "password", size
=(175, -1),  
  17         sizer 
= wx
.FlexGridSizer(cols
=2, hgap
=6, vgap
=6) 
  18         sizer
.AddMany([basicLabel
, basicText
, pwdLabel
, pwdText
]) 
  21 if __name__ 
== '__main__': 
  22     app 
= wx
.PySimpleApp()