How to align the text of a Listbox to the right

Sori Schwimmer sxn02 at yahoo.com
Thu Apr 27 13:15:45 EDT 2006


For a listbox, I would give a width and go with string
formatting. In your case, I guess that what I'll do is
to limit the width to something acceptable, and show
only the tail of the line.

Say, your width is w, then I'll show only the last w-4
chars, preceded by '... ' (ellipsis+space). It might
be nice to put a label on top of your listbox and
dynamically change it's text attribute to the complete
version of your selection in the listbox, broken in
lines of appropriate length.

Hope this helps,
Sorin Schwimmer

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Python-list mailing list