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:
- Set the font in the listbox to a fixed pitch font.
- Investigate the font metrics tools available in the toolkit you are using.
Eg. If you are using Tk, take a look at $widget->fontMeasure(font, text).
- Use a more sophisticated widget setup.
Eg. use a Tk::Table (or equivalent for your toolkit).
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".