]>
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.
15 ############################################################################\
16 # Note: this demo has been converted, but the control is deprecated because |
17 # wx.TextCtrl now supports the wx.TE_RIGHT style flag, which makes this |
18 # control completely superfluous. |
19 ############################################################################/
22 import wx
.lib
.rightalign
as right
24 #----------------------------------------------------------------------
26 class TestPanel(wx
.Panel
):
27 def __init__(self
, parent
):
28 wx
.Panel
.__init
__(self
, parent
, -1)
30 fgs
= wx
.FlexGridSizer(cols
=2, vgap
=5, hgap
=5)
34 "These text controls will align their contents to\n"
35 "the right (on wxMSW) when they don't have focus.",
40 fgs
.Add(right
.wxRightTextCtrl(self
, -1, "", size
=(75, -1)))
43 fgs
.Add(right
.wxRightTextCtrl(self
, -1, "123.45", size
=(75, -1)))
46 fgs
.Add(right
.wxRightTextCtrl(self
, -1, "234.56", size
=(75, -1)))
49 fgs
.Add(right
.wxRightTextCtrl(self
, -1, "345.67", size
=(75, -1)))
52 fgs
.Add(right
.wxRightTextCtrl(self
, -1, "456.78", size
=(75, -1)))
54 sizer
= wx
.BoxSizer(wx
.VERTICAL
)
55 sizer
.Add(fgs
, 0, wx
.ALL
, 25)
58 self
.SetAutoLayout(True)
62 #----------------------------------------------------------------------
64 def runTest(frame
, nb
, log
):
68 #----------------------------------------------------------------------
70 overview
= right
.__doc
__
73 if __name__
== '__main__':
76 run
.main(['', os
.path
.basename(sys
.argv
[0])])