RibbonTab double-click event

3 posts, 1 answers
  1. Nick Wasko
    Nick Wasko avatar
    4 posts
    Member since:
    Jul 2008

    Posted 18 Aug 2009 Link to this post

    I remember seeing that a RadButton no longer fires a double-click event and instead fires two Click events.

    I have code that used to run in the double-click event handler for a RibbonTab, but now that code no longer runs with version 2009.2.9.729.  Does the RibbonTab also no longer fire a double-click event?  If not, do you have any suggestions for simulating a double-click, as I have separate code for the (single) click event handler.

    Nicholas Wasko
  2. Answer
    Deyan avatar
    2147 posts

    Posted 19 Aug 2009 Link to this post

    Hello Nick,

    Thanks for contacting us and for reporting this issue.

    Indeed, we have removed the DoubleClick logic from RadButtonItem in our latest release since the double click event for a button is not conceptually right. Since the RibbonTab inherits from RadButtonItem this event will not work for it as well. We have put this in our Breaking Changes list for Q2 2009.

    I have prepared a quick workaround for you though. Take a look at the following code snippet:

    public MyForm() 
         this.radRibbonBar1.DoubleClick += new EventHandler(radRibbonBar1_DoubleClick); 
    void radRibbonBar1_DoubleClick(object sender, EventArgs e) 
         Point pointInRibbon = this.radRibbonBar1.PointToClient(Control.MousePosition); 
         RibbonTab tabToDoubleClick = this.ribbonTab1; 
         if (this.ribbonTab1.ControlBoundingRectangle.Contains(pointInRibbon)) 
              //Do some double click logic 

    Basically, I use the DoubleClick event of the RadRibbonBar control. When I double click on the RadRibbonBar, this event fires. In its handler, I check whether the position of the mouse cursor is above my tab. If yes, I do the logic which is to be executed upon double click on a certain tab.

    I hope this is helpful. Do not hesitate to write back if you need further assistance.

    Kind regards,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Nick Wasko
    Nick Wasko avatar
    4 posts
    Member since:
    Jul 2008

    Posted 14 Sep 2009 Link to this post

    Thanks, that works for now!
Back to Top