Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
Doubleclick on scrollbar in UltraTree
posted

How come the UltraTree control fires a DoubleClick event, when I doubleclick on the scrollbar?

The result is that DoubleClick fires, when a user is scolling up or down, and is clicking a little bit too fast on the up or down arrows.

Is there a way to disable or work around this feature?

 

Regards,

Jørn

 

 

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi Joesn,

         The reason that most controls don't fire events like Click and DoubleClick when the mouse is on the scrollbar is that the scrollbar is provided by a window style is not part of the client area of the control.

        In the case of the Infragistics controls, this is not the case. Infragistics controls use an UltraScrollBar, so this allows the scrollbar to be themed and you can apply appearances to them. So they have more functionality than a regular scrollbar.

        I thought that there was a NodeDoubleClick event on UltraWinTree, so if you are only concerned with responding to a double-click on a node, you could use that event. If you want to deal with other parts of the tree (or if I am wrong about the existance of that event), then you need to determine what part of the tree the mouse is over. The best way to do this is to use the UIElements of the tree. Do a search in the Infragistics KnowledgeBase for the "ElementFromPoint" method and this will give you a whole bunch of articles that describes how to determine what part of an an Infragistics control is at a point such as the current location of the mouse.

        If you can give me some more specifics about exactly what parts of the tree you are concerned with, I can probably give you more detailed info. But it sounds like you need to get the UIElement that the moue is currently over and then call GetAncestor and try to find a ScrollBarUIElement. If you find one, then you will know the mouse is on a scroll bar and you can skip your DoubleClick event logic.

        Also, if you are going to be working with UIElements, I recommend getting the UIElementVewer Utility. It's a big help.

        http://geekswithblogs.net/devin/archive/2005/11/17/60406.aspx 

         

Children