If the listbox is using a proportional font, then sprintf alignment (which is based on equal width characters) will not do the job.
Three possibilities:
Eg. If you are using Tk, take a look at $widget->fontMeasure(font, text).
Eg. use a Tk::Table (or equivalent for your toolkit).
In reply to Re: string alignment
by BrowserUk
in thread string alignment
by joybee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |