I could not find an appropriate ListBox that supported expandable & collapseable categories with items under them (like many File Explorers) and I really needed one with what I was doing.
I did not like the 2 Listbox option - where the first listbox has the categories in it that when clicked shows the items under that category in a second listbox.
I did not want to use an external control or interface with a DLL.........
so I wrote one.... It uses a standard listbox control and the code manipulates categories / items (single level only)
Looks like the following, in the listbox
+ Category One
- Category Two
Item One - Category Two
Item Two - Category Two
+ Category Three
Double clicking a category expands/collapses
Double clicking an item will return the "category * item"
Keyboard methods work as well (up/down, return key)
The init method documents how to add categories and items. After that the code goes about expanding and collapseing. Add your methods for dealing with selected items.
Works for me -- If anyone is interested, I'd be willing to share, PM me.
Bookmarks