08-19-2003 06:05 AM
08-20-2003 06:01 PM
08-21-2003 09:10 AM
06-16-2006 01:58 PM
I'm reviving this thread in the hope that there may be new approaches available.
The problem: List controls support formatting with escape codes (via the InsertListItem function), but do not support horizontal scroll bars. On the other hand, the TextBox control has horizontal scroll bars, but no support for escape code formatting.
The List control is nice because it supports a mix of tablular output (using those escape codes) interspersed with lines of text as needed.
But, in the world of splitters and re-sizing of controls, horizontal scroll bars are more important now.
So, are there any new options?
Thanks,
Ian
06-19-2006 12:10 PM
You might want to try using the tree that was introduced in version 7.0. You can make a tree look and behave just like a listbox with a lot more functionality such as...
- horizontal scroll bar
- tooltips
- multiple item selection option
- drag and drop within the list
- sorting
- search
- customizable right click menu
- columns
- edit item labels at run time
However, while you can have columns in the tree to display tabular data like you could in the listbox, you don't do it through each item's escape codes, you do it by adding columns. Therefore, you can't have columns on some items and not have columns on other items. So, I'm not sure you can intersperse tabular output with lines of text like you mentioned.
Take a look at the attached code to see how to begin to configure a tree to be a listbox.
Hope this helps.
- jared
06-20-2006 08:55 AM
Thanks, jared, for the informative example.
In my case the interactivity (e.g. drag/drop/sort/search/expand/tooltip) is not really necessary, as it is purely for displaying data.
Setting aside the need to intersperse lines of text, I'm still curious: Would there be any advantage to using a table control instead? Or were there particular ("non-interactive") features of the tree control that led you to recommend it?
Thanks,
Ian
06-20-2006 12:49 PM