]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/RightTextCtrl.py
1 #####################################################################\
2 # Note: This control is deprecated because wx.TextCtrl now supports |
3 # the wx.TE_RIGHT style flag, which makes this control completely |
5 #####################################################################/
8 import wx
.lib
.rightalign
as right
10 #----------------------------------------------------------------------
12 class TestPanel(wx
.Panel
):
13 def __init__(self
, parent
):
14 wx
.Panel
.__init
__(self
, parent
, -1)
16 fgs
= wx
.FlexGridSizer(cols
=2, vgap
=5, hgap
=5)
20 "These text controls will align their contents to\n"
21 "the right (on wxMSW) when they don't have focus.",
26 fgs
.Add(right
.RightTextCtrl(self
, -1, "", size
=(75, -1)))
29 fgs
.Add(right
.RightTextCtrl(self
, -1, "123.45", size
=(75, -1)))
32 fgs
.Add(right
.RightTextCtrl(self
, -1, "234.56", size
=(75, -1)))
35 fgs
.Add(right
.RightTextCtrl(self
, -1, "345.67", size
=(75, -1)))
38 fgs
.Add(right
.RightTextCtrl(self
, -1, "456.78", size
=(75, -1)))
40 sizer
= wx
.BoxSizer(wx
.VERTICAL
)
41 sizer
.Add(fgs
, 0, wx
.ALL
, 25)
44 self
.SetAutoLayout(True)
48 #----------------------------------------------------------------------
50 def runTest(frame
, nb
, log
):
54 #----------------------------------------------------------------------
56 overview
= right
.__doc
__
59 if __name__
== '__main__':
62 run
.main(['', os
.path
.basename(sys
.argv
[0])] + sys
.argv
[1:])