[wxPython-users] Vertical Text?

Christopher Barker Chris.Barker at noaa.gov
Mon Jan 22 09:57:12 PST 2007


Tim Ansell wrote:
> I was wondering if there is an easy way to do vertical text in wxPython?
> (Either A Static Text Ctrl which renders the text vertically or rotated
> by 90 degrees.)
> 
> I'm pondering two methods to do it,
>  - Split the text into individual characters and put them in a Vertical
> Box sizer.

That I wouldn't do -- it just seems very heavyweight

>  - Rendering to a DC and rotating the DC by 90 degrees.

That would work OK, or, if you'd rather have the text vertical, but the 
letter normal, you could render each letter with a DC, using 
DC.GetTextExtents to figure out where to place all the letters.

I imagine that the Generic StaticText :

wx.lib.stattext.GenStaticText

would be a good place to start.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov




More information about the wxpython-users mailing list