CommandBarStrip right click hide

7 posts, 2 answers
  1. Joe Sugden
    Joe Sugden avatar
    52 posts
    Member since:
    Feb 2010

    Posted 09 Dec 2010 Link to this post

    Hello,

    We want to disable the feature where the user can right-click a strip and hide it by clicking it.
    See screenshot for more details.

    Thanks in advance.
  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 09 Dec 2010 Link to this post

    Hi Joe,

    Oddly, I haven't yet found a way to get rid of these right click menus, but I will keep looking. In the meantime, you could always stretch the CommandStripElement so the area is not available to click on.

    CommandBarStripElement1.StretchHorizontally = True

    Hope this helps. I'll get back to you if/when I find a solution.
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Joe Sugden
    Joe Sugden avatar
    52 posts
    Member since:
    Feb 2010

    Posted 09 Dec 2010 Link to this post

    Thanks, that works for now.
  5. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 09 Dec 2010 Link to this post

    Glad that helps Joe. I've been looking for some time now. It seems quite tricky to actually remove these items.
    All the best
    Richard
  6. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 15 Dec 2010 Link to this post

    Hi,

    Thank you for the feedback.

    We will provide a better way to handle this behavior with property or events in the upcoming SP1 release
    scheduled for this week.

    I hope this helps.

    All the best,
    Peter
    the Telerik team
    Get started with RadControls for WinForms with numerous videos and detailed documentation.
  7. Graeme Lynch
    Graeme Lynch avatar
    6 posts
    Member since:
    Aug 2009

    Posted 25 Mar 2011 Link to this post

    I was wondering if there is an option somewhere to now disable this right click functionality.

    I have tried changing the customize context menu option so that it is not enabled and not visible but still I get the pop up.
    Stretching the strip bar does not matter as a right mouse on a command bar icon seems to do the same thing.
  8. Answer
    Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 30 Mar 2011 Link to this post

    Hello Graeme Lynch,

    You can disable the customize menu of a RadCommandBar by subscribing and canceling the DropDownOpening event of its menu:
    //...
    radCommandBar1.CustomizeContextMenu.DropDownOpening += new CancelEventHandler(CustomizeContextMenu_DropDownOpening);
    //...
     
    void CustomizeContextMenu_DropDownOpening(object sender, CancelEventArgs e)
    {
        e.Cancel = true;
    }

    As to the customize menu opening on a right click even on a command bar icon, this issue has appeared in the latest release and will be address in the upcoming SP1.

    I hope you find this useful. Feel free to ask if you have any additional questions.

    Regards,
    Ivan Todorov
    the Telerik team
Back to Top
UI for WinForms is Visual Studio 2017 Ready