]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxRightTextCtrl.py
1 # 11/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
3 # o Updated for wx namespace
5 # 11/30/2003 - Jeff Grimmett (grimmtooth@softhome.net)
7 # o The rightalign library needs converted for this to work correctly.
9 # 12/11/2003 - Jeff Grimmett (grimmtooth@softhome.net)
11 # o All issues resolved.
13 # 12/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
15 # o wxRightTextCtrl -> RightTextCtrl
18 ############################################################################\
19 # Note: this demo has been converted, but the control is deprecated because |
20 # wx.TextCtrl now supports the wx.TE_RIGHT style flag, which makes this |
21 # control completely superfluous. |
22 ############################################################################/
25 import wx
.lib
.rightalign
as right
27 #----------------------------------------------------------------------
29 class TestPanel(wx
.Panel
):
30 def __init__(self
, parent
):
31 wx
.Panel
.__init
__(self
, parent
, -1)
33 fgs
= wx
.FlexGridSizer(cols
=2, vgap
=5, hgap
=5)
37 "These text controls will align their contents to\n"
38 "the right (on wxMSW) when they don't have focus.",
43 fgs
.Add(right
.RightTextCtrl(self
, -1, "", size
=(75, -1)))
46 fgs
.Add(right
.RightTextCtrl(self
, -1, "123.45", size
=(75, -1)))
49 fgs
.Add(right
.RightTextCtrl(self
, -1, "234.56", size
=(75, -1)))
52 fgs
.Add(right
.RightTextCtrl(self
, -1, "345.67", size
=(75, -1)))
55 fgs
.Add(right
.RightTextCtrl(self
, -1, "456.78", size
=(75, -1)))
57 sizer
= wx
.BoxSizer(wx
.VERTICAL
)
58 sizer
.Add(fgs
, 0, wx
.ALL
, 25)
61 self
.SetAutoLayout(True)
65 #----------------------------------------------------------------------
67 def runTest(frame
, nb
, log
):
71 #----------------------------------------------------------------------
73 overview
= right
.__doc
__
76 if __name__
== '__main__':
79 run
.main(['', os
.path
.basename(sys
.argv
[0])])