]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/wxRightTextCtrl.py
checked in forgottern parts of MSLU changes
[wxWidgets.git] / wxPython / demo / wxRightTextCtrl.py
CommitLineData
729f4276
RD
1
2from wxPython.wx import *
3from wxPython.lib.rightalign import wxRightTextCtrl
4import wxPython.lib.rightalign
5
6
7#----------------------------------------------------------------------
8
9class TestPanel(wxPanel):
10 def __init__(self, parent):
11 wxPanel.__init__(self, parent, -1)
12
13 fgs = wxFlexGridSizer(cols=2, vgap=5, hgap=5)
14 txt = wxStaticText(self, -1,
4309b812
RD
15 "These text controls will align their contents to\n"
16 "the right (on wxMSW) when they don't have focus.", style=wxALIGN_RIGHT )
729f4276
RD
17 fgs.Add(txt)
18 fgs.Add(wxRightTextCtrl(self, -1, "", size=(75, -1)))
19
20 fgs.Add(10,10)
21 fgs.Add(wxRightTextCtrl(self, -1, "123.45", size=(75, -1)))
22
23 fgs.Add(10,10)
24 fgs.Add(wxRightTextCtrl(self, -1, "234.56", size=(75, -1)))
25
26 fgs.Add(10,10)
27 fgs.Add(wxRightTextCtrl(self, -1, "345.67", size=(75, -1)))
28
29 fgs.Add(10,10)
30 fgs.Add(wxRightTextCtrl(self, -1, "456.78", size=(75, -1)))
31
32 sizer = wxBoxSizer(wxVERTICAL)
33 sizer.Add(fgs, 0, wxALL, 25)
34
35 self.SetSizer(sizer)
36 self.SetAutoLayout(true)
37
38
39
40#----------------------------------------------------------------------
41
42def runTest(frame, nb, log):
43 win = TestPanel(nb)
44 return win
45
46#----------------------------------------------------------------------
47
48overview = wxPython.lib.rightalign.__doc__