The TadxCommandBarComboBox...

Add-in Express™ Support Service
That's what is more important than anything else

The TadxCommandBarComboBox...
Wim W.A. ten Brink

Workshop Alex

Posts: 30
Joined: 2005-11-23
I discovered one minor issue with the TadxCommandBarComboBox component which I don't think can be solved because it would break all existing code. The problem is that the ListIndex property is not the index of a zero-based array.
Still, it might be interesting to add a second property to this component called ItemIndex which always returns ListIndex-1. This is useful since almost all other Delphi lists and arrays start with 0 as their first element.

This is especially useful when I need access to the Items property. I have used AddObject to add strings to the dropdown to link a name with a pointer to some data. Now I need to use Items.Objects[Pred(ListIndex)] which can be confusing if someone else takes over my project. (Because with other stringlists I use Items.Object[ItemIndex])

So one additional property called ItemIndex would make this component a bit more similar to other dropdown listboxes and other lists.
With kind regards,
\/\//\ Workshop Alex
Posted 16 Feb, 2006 07:58:55 Top
Dmitry Kostochko

Add-in Express team

Posts: 2752
Joined: 2004-04-05
Hi Wim,

Thank you for your suggestion. We will discuss it and probably add this feature.

Posted 16 Feb, 2006 09:39:03 Top