[wxPython] Right alignment in wxTextCtrl?

F. GEIGER fgeiger at datec.at
Mon Jan 6 03:28:43 EST 2003


> In the demo for wxPython 2.3.3.1 look at wxRightTextCtrl under "More
> Windows/Controls".

Perfect! I'm working with 2.3.2, but the control is already there (it's not
in the demo, though).

Many thanx and kind regards
Franz

"Donnal Walter" <donnalcwalter at yahoo.com> schrieb im Newsbeitrag
news:mailman.1041768428.18166.python-list at python.org...
>
> "F. GEIGER" <fgeiger at datec.at> wrote in message
> news:3e17fbf1 at news.swissonline.ch...
> > I'd like to create a NumberTextbox class, which differs from the
standard
> > wxTextCtrl in that it right aligns its text (which are numbers, of
> course).
> > As I cannot find the right property for achieving this (the Style
methods
> > seem to change the font and its appearance only), I'm afraid I have to
> > invent something by myself. But before I go into interstion point calcs
> > and/or string padding or whatever, I'd like to ask, if there's anything
> I've
> > missed.
>
> from wxPython.lib.rightalign import wxRightTextCtrl
>
> In the demo for wxPython 2.3.3.1 look at wxRightTextCtrl under "More
> Windows/Controls".
>
> IIRC, some native controls (MSW, for example) also support
> 'style=wxTE_RIGHT'. You might want to give this a try this first.
>
> Donnal Walter
> Arkansas Children's Hospital
>
>
>
>
>






More information about the Python-list mailing list