Customize ContextMenu of TabItem

6 posts, 1 answers
  1. Adam
    Adam avatar
    89 posts
    Member since:
    Mar 2008

    Posted 05 Jan 2009 Link to this post

    What is the best way to go about customizing what options appear when you right click on a tab in a docking manager?  I know its possible to show/hide the context menu via the TdiContextMenuVisible property.  Ultimately what I want to do is remove the ability of users to create their own tab groups.  I like the "Close All Tabs Except for this" option and would like for that to remain.

    Thanks in advance.
  2. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 06 Jan 2009 Link to this post

    Hi Adam,

    Thank you for the question.

    Please refer to the following Knowledge Base article regarding the topic of customizing the context menus in RadDock: Customizing ContextMenus in RadDock.

    I hope this helps. If you need further assistance, feel free to contact me.

    Kind regards,
    Nikolay
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Adam
    Adam avatar
    89 posts
    Member since:
    Mar 2008

    Posted 06 Jan 2009 Link to this post

    The kb article was helpful, however in my situation I am using the dockingManager as an MDI parent and don't have any dock panels on it.  Is there another way to access the drop down menu other than through the dockpanel?  Or some way to get the dockpanel that the tabbed documents are on?

    Thanks for the awesome support.
  5. Answer
    Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 07 Jan 2009 Link to this post

    Hi Adam,

    The approach used in the article is applicable to DocumentPanes as well. In the example provided, just replace the DockPanel instances with DocumentPane instances.

    Contact me, if you need further assistance.

    Sincerely yours,
    Nikolay
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Adam
    Adam avatar
    89 posts
    Member since:
    Mar 2008

    Posted 07 Jan 2009 Link to this post

    I didn't really understand what the GetDefaultItem("") call was doing in the example, however I figured out that I can just loop through the items collection of the DockContextMenu within the DropDownOpening call and hide the items I want.  This works exactly how I expect.

    Thanks for your help!
  7. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 10 Jan 2009 Link to this post

    Hi Adam,

    I am glad to hear that I was of help.

    As to the GetDefaultItem method, its purpose its just to return a DockMenuItem by a string key.

    Sincerely yours,
    Nikolay
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
UI for WinForms is Visual Studio 2017 Ready