I'd was wondering if there was some fairly easy way to display text in a 
Label such that it is is anchored on the west (short strings are against 
the left edge), but too-long strings are truncated on the left. This 
would be useful for displaying very long path names. It might be even 
nicer to truncate the text in the middle, replacing the excess text with 
..., but truncating on the left would be fine.

I fear the only way is to use font metrics (using a tkFont object from 
the tkFont module) and iteratively try to figure out what length of 
string will fit. If so, it sounds messy. Hope I'm missing something.

-- Russell

_______________________________________________
Tkinter-discuss mailing list
[email protected]
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to