[Tkinter-discuss] Rotated text

Sorin Schwimmer sxn02 at yahoo.com
Tue Dec 5 16:54:34 CET 2006


I dug over the weekend and found a solution to my problem. If anyone is interested in such a thing,
here is an example of rotated text using BLT:

<code>
#! /usr/bin/python

from Tkinter import *
import Pmw

r=Tk()
g=Pmw.Blt.Graph(r)
g.axis_configure('x',hide=1)
g.axis_configure('y',hide=1)
g.marker_create('text',rotate=90,text='Dufferin St.',coord=(.5,.5),background='#ffffff')
g.marker_create('text',text='Finch Ave.',coord=(.3,.17),background='#ffffff')
g.marker_create('text',text='Martin Ross St.',coord=(.3,.72),background='#ffffff')
g.marker_create('line',coord=(.1,.7,.48,.7,.48,.2,.2,.2))
g.marker_create('line',coord=(.1,.75,.48,.75,.48,.92))
g.marker_create('line',coord=(.2,.14,.48,.14,.48,.1))
g.marker_create('line',coord=(.52,.1,.52,.14,.6,.14))
g.marker_create('line',coord=(.6,.2,.52,.2,.52,.92))
g.marker_create('polygon',coord=(.3,.68,.2,.68,.2,.58,.3,.58),fill='white',linewidth=1)
g.marker_create('polygon',coord=(.28,.68,.26,.68,.26,.58,.28,.58),fill='gray')

g.grid()
r.mainloop()
</code>

Sorin




 
____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tkinter-discuss/attachments/20061205/7d60661b/attachment.htm 


More information about the Tkinter-discuss mailing list