]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxRightTextCtrl.py
47428fc642305f9a9c829309fd0818279ed47f01
2 from wxPython
.wx
import *
3 from wxPython
.lib
.rightalign
import wxRightTextCtrl
4 import wxPython
.lib
.rightalign
7 #----------------------------------------------------------------------
9 class TestPanel(wxPanel
):
10 def __init__(self
, parent
):
11 wxPanel
.__init
__(self
, parent
, -1)
13 fgs
= wxFlexGridSizer(cols
=2, vgap
=5, hgap
=5)
14 txt
= wxStaticText(self
, -1,
15 "These text controls will align their contents\n"
16 "to the right when they don't have focus.", style
=wxALIGN_RIGHT
)
18 fgs
.Add(wxRightTextCtrl(self
, -1, "", size
=(75, -1)))
21 fgs
.Add(wxRightTextCtrl(self
, -1, "123.45", size
=(75, -1)))
24 fgs
.Add(wxRightTextCtrl(self
, -1, "234.56", size
=(75, -1)))
27 fgs
.Add(wxRightTextCtrl(self
, -1, "345.67", size
=(75, -1)))
30 fgs
.Add(wxRightTextCtrl(self
, -1, "456.78", size
=(75, -1)))
32 sizer
= wxBoxSizer(wxVERTICAL
)
33 sizer
.Add(fgs
, 0, wxALL
, 25)
36 self
.SetAutoLayout(true
)
40 #----------------------------------------------------------------------
42 def runTest(frame
, nb
, log
):
46 #----------------------------------------------------------------------
48 overview
= wxPython
.lib
.rightalign
.__doc
__