Added wxRightTextCtrl from Josu Oyanguren
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
48
wxPython/demo/wxRightTextCtrl.py
Normal file
48
wxPython/demo/wxRightTextCtrl.py
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
from wxPython.wx import *
|
||||
from wxPython.lib.rightalign import wxRightTextCtrl
|
||||
import wxPython.lib.rightalign
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
class TestPanel(wxPanel):
|
||||
def __init__(self, parent):
|
||||
wxPanel.__init__(self, parent, -1)
|
||||
|
||||
fgs = wxFlexGridSizer(cols=2, vgap=5, hgap=5)
|
||||
txt = wxStaticText(self, -1,
|
||||
"These text controls will align their contents\n"
|
||||
"to the right when they don't have focus.", style=wxALIGN_RIGHT )
|
||||
fgs.Add(txt)
|
||||
fgs.Add(wxRightTextCtrl(self, -1, "", size=(75, -1)))
|
||||
|
||||
fgs.Add(10,10)
|
||||
fgs.Add(wxRightTextCtrl(self, -1, "123.45", size=(75, -1)))
|
||||
|
||||
fgs.Add(10,10)
|
||||
fgs.Add(wxRightTextCtrl(self, -1, "234.56", size=(75, -1)))
|
||||
|
||||
fgs.Add(10,10)
|
||||
fgs.Add(wxRightTextCtrl(self, -1, "345.67", size=(75, -1)))
|
||||
|
||||
fgs.Add(10,10)
|
||||
fgs.Add(wxRightTextCtrl(self, -1, "456.78", size=(75, -1)))
|
||||
|
||||
sizer = wxBoxSizer(wxVERTICAL)
|
||||
sizer.Add(fgs, 0, wxALL, 25)
|
||||
|
||||
self.SetSizer(sizer)
|
||||
self.SetAutoLayout(true)
|
||||
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
win = TestPanel(nb)
|
||||
return win
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
overview = wxPython.lib.rightalign.__doc__
|
Reference in New Issue
Block a user