Dynamically Create a Contextual Tab

4 posts, 1 answers
  1. Mark Hanson
    Mark Hanson avatar
    9 posts
    Member since:
    Oct 2012

    Posted 11 Aug 2009 Link to this post

    I am seeking any reference to see if RibbonBar can support dynamic creation of Contextual Tabs.

    Business Example:

    I have a ribbon bar with one tab "Contacts" with button options to "Add New", "Edit Existing" or 'Delete" and a list of existing contacts.

    When I select "Add New" this would create a contextual tab "Add New Contact" display buttons "Save" or "Cancel" and a form to complete the contacts details. When press "Save" or "Cancel" the contextual tab would close.

    When I select "Edit Existing" this would create a contextual tab "Edit Existing Contact" display buttons "Save" or "Cancel" and a form with the contacts info to edit the contacts details. When press "Save" or "Cancel" the contextual tab would close.

    I would like to have multiple contextual tabs open at the same time... "Add New", "Edit Exiting", "Edit Existing", etc..

    Any guidence would be greatly appreciated!
  2. Answer
    Peter
    Admin
    Peter avatar
    1148 posts

    Posted 12 Aug 2009 Link to this post

    Hi Mark Hanson,

    Please, refer to the attached sample project how to add and remove dynamically RibbonTabs with associated Context Groups and how to add groups to the existing ribbon tabs. Hope this helps.

    All the best,
    Peter
    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. UI for WinForms is Visual Studio 2017 Ready
  4. Mark Hanson
    Mark Hanson avatar
    9 posts
    Member since:
    Oct 2012

    Posted 12 Aug 2009 Link to this post

    Hi Peter,

    Thanks for the sample it certainly helps.

    There are a few issues with the contextual tab we were facing and are also in your sample.

    I have posted a support ticket 234527 with my sample and instructions to reproduce.

    Thanks
    Mark
  5. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 12 Aug 2009 Link to this post

    Hello Mark Hanson,

    You can find the answer to your question in your support ticket. I am posting the answer again for those who may be interested in the topic as well:

    1) Please, add these lines of code after you add a Tab:

    ribbonTab1.IsSelected = true
    Application.DoEvents(); 
    newTab.IsSelected = true

    I logged this issue in our ToDo list.

    2) We will investigate the problem and we will try to provide a fix in some of the upcoming releases.

    3) Currently RadRibbonBar doesn't support that. We are aware of this limitation and we will consider implementing the functionality in the next release.

    4) These glitches are caused because Vista Aero effect is controlled by DWM but we draw with GDI+
    in general. We will try to improve the rendering when Vista Aero is used.

    Best wishes,
    Peter
    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.
Back to Top