I have populated an UltraExplorerBar with Groups and Items.
Now the system needs to automatically open a certain Group and simulate ItemClick on a particular Item in that Group.
How do I do that?
I'd select the group using the SelectedGroup property as this is important feedback to the user.
I would not simulate the item click - I'd rather call the same "worker method" from the actual event handler and your other routine.
And what is the .NET way to find the Item given the key so I can find the Group?
rbf wrote:
And what is the .NET way to find the Item given the key so I can find the Group?
This works. You can also use an ordinal value .
message this-object this-object:GetClass():TypeName program-name(1) program-name(2) skip(2)
uxAccordion:Groups:Item["Orders"]:Items["ListOrders"]:Key
uxAccordion:Groups:Item["Orders"]:Items["ListOrders"]:Text
view-as alert-box error title '[PJ DEBUG]'.
-- peter
And what is the .NET way to find the Item given the key so I can find the Group?
oGroup = ultraExplorerBar1:GetItemByKey ("your key here"):Group .
/* Returns the first Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem in the Infragistics.Win.UltraWinExplorerBar.UltraExplorerBar with the specified Key. */
Of course!
I had already forgotten. Thanks.
-peter
mikefe wrote:
I'd select the group using the SelectedGroup property as this is important feedback to the user.
I would not simulate the item click - I'd rather call the same "worker method" from the actual event handler and your other routine.
Just out of curiosity: if I still wanted to click the item, how could I do that?
Just out of curiosity: if I still wanted to click the item, how could I do that?
I don't know - maybe use a SendMessageA Windows API to simulate a mouse click by sending the Control the proper message?
Or inherit from the UltraExplorerBar class so that you can call the PROTECTED method OnItemClick. I'd probably go for the latter.
Sounds like that is not the way to go then.