I need to check if an object from a class derived from ComboBox class is enabled/disabled.
The object is contained in a TreeView Structure.
I tried writing a function which retains the default-selected-index (of the item in the combo)in a variable, and then selects another element of the combo. TRUE is returned is the last GetSelIndex is different from the first one.
Not really working = it always returns true (although the dropdown is clearly disabled); and no errors
I tried using IsEnabled too, but it always returns true.
It might be because the ComboBox is included in a tree.
I acces it this way:
dropdown = treeview.GetDropDown("/"+level1+"/"+level2+"|*")
(GetDropDown is a user function, and it works)
I tried several workarounds, and I'm running out of ideas.
For example I tried using TreeView's IsItemEditable (IsItemEditable returns TRUE if the specified treeview item can be edited using the mouse and keyboard. ) - I thought this would 'cover' the problem ("not enabled" = "not editable" too). This always returns false (another unusual thing about this function : it might return false for editable fields which only accept numeric data )