Version 5 of vertical labels

Updated 2003-02-25 07:30:22

MGS Here's a nasty-ish hack to make labels with vertical text. Not rotated text, just with the letters stacked on top of each other. For spaces, you need to insert two newlines.

  label .l -text "Vertical\n\nLabel" -wraplength 1
  pack  .l

Make sure the label is packed/gridded so as not to expand or fill horizontally.


RS Another way is:

 label .l2 -text [join [split "Vertical text" ""] \n]

This way is slower and alters the actual text contained in the label rather than just how it wraps, though. -FW - RS: Well, it processes a copy of the text, which is perfectly normal in Tcl - but needs no workaround for spaces... ;-)


Mike Tuxford thinks both of those are clever and would come in handy for use with Animated Vertical Tabs