Hi,
I have a UltraExplorerBar with groups and items created at run-time.
The problem is that the user has to click on the label of an item to select it. It would be much easier if he could click everywhere in the line (which is the case for a group, but not for an item).
If I add spaces at the end of the item label, it does'nt change anything.
Regards.
Olivier FALCY.
Hello Oliver,
What you could do is to hook to the 'MouseEnterElement' and to check if the e.Element is an 'ItemUIElement'. Then if the above is true in 'MouseClick' to run your code.
Please do not hesitate to contact us if you need any additional assistance.
Hello Boris,
Thank you for your quick answer.
I've tried your method but I don't know how to run the code in 'MouseClick' because to do that, I must access the property 'TAG' of the item I've just clicked.
To be more specific:
The code I have to run is in the "ItemClick" event of the UltraExplorerBar.
According to your advice, I've add a "MouseEnterElement" to my UltraExplorerBar to assign a flag to TRUE if e.Element is an 'ItemUIElement'. Then I've add a "MouseClick" event to the UltraExplorerBar and if the value of my flag is TRUE when the event is fired, I know I have to run my code.
The problem is that I don't know at this point which Item has been selected because in the "MouseClick" event, e is a "System.Windows.Forms.MouseEventArgs" and not a "Infragistics.Win.UltraWinExplorerBar.ItemEventArgs" as in the "ItemClick" event.
Olivier FALCY
After reading your post I slightly changed my approach and created a sample for you.
Please review it and feel free to let me know if I misunderstood you or if you have any other questions.
Your solution works fine.
Thank you very much.