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:
Robin Dunn
2001-10-21 03:43:58 +00:00
parent 235573500c
commit 729f427637
4 changed files with 124 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ _treeList = [
'wxFindReplaceDialog',
'DrawXXXList',
'ErrorDialogs',
'wxRightTextCtrl',
##'wxPopupWindow',
]),
@@ -74,6 +75,7 @@ _treeList = [
'FileBrowseButton', 'GenericButtons', 'wxEditor',
'ColourSelect', 'ImageBrowser',
'infoframe', 'ColourDB', 'PyCrust', 'TablePrint',
'wxRightTextCtrl',
]),
('Cool Contribs', ['pyTree', 'hangman', 'SlashDot', 'XMLtreeview']),

View 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__