Showing new form/panel on GroupExpandedChanged

6 posts, 1 answers
  1. David Ching
    David Ching avatar
    11 posts
    Member since:
    Sep 2007

    Posted 24 Aug 2008 Link to this post

    Hello, I am sure this is a simple question but I can't find any example.  I am implementing an Outlook-like functionality, that means there is a RadPanel docked on the form's left edge.  When a Group in the RadPanel is selected, then the rest of the form (to the right of the RadPanel) should show different content.  For example, when the Contacts group is selected, then the form should show contacts, and when Mail is selected, the form should show mail messages. 

    How do I do this?  Is the Contacts and Mail content supposed to go into a new form or panel that I am supposed to show and hide when the appropriate Group is selected?  How do I design the content using the forms designer so I can drag and drop controls onto it?

    BTW, the RadTabStrip works exactly like how I want; when I click on a Tab in the designer, it shows the selected tab item's ContentPanel so I can drop controls onto it, and at runtime it shows the ContentPanel when I click on the tab. 

    How to get this functionality using the RadPanel instead of RadTapStrip?

    Thanks,
    David
  2. Answer
    Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 27 Aug 2008 Link to this post

    Hi David Ching,

    RadPanelBar has its own ContentPanels for each RadPanelBarGroupElement. In order to enable them, you should set RadPanelBarGroupElement.EnableHostControlMode to True. Speaking about the Outlook-like functionality, these content panels will hold RadTreeView for mail categories, several RadCalendars, RadRadioButtons, etc. - whatever is suitable to your scenario for the RadPanelBar's ContentPanels.

    However, for the content on the right part of the form, you should use separate RadPanels. The approach I would suggest for designing these RadPanels is the following:
    1. Assume that we have a RadPanelBar docked to the left and two groups inside it.
    2. Drag a RadPanel on the form and set its Dock to Fill.
    3. Drag the appropriate content on this panel.
    4. Now we want to setup another RadPanel. For this purpose, undock the first RadPanel and place it somewhere else in the form (temporarily).
    5. Drag a new RadPanel on the form and set its Dock to Fill.
    6. Fill it with its appropriate content.
    7. Now we have two RadPanels ready. However, the first is not positioned in the form properly. To do this, in the Properties pane select the first RadPanel from the combobox and set its Dock to Fill. This will result in two RadPanels with appropriate location and size and with the necessary content in them.
    8. Since you want to show a specific RadPanel at a time, again from the control combobox in the Properties pane choose the RadPanels and set their Visibility to False.
    9. Wire the necessary events to the RadPanelBar and show/hide the corresponding RadPanels when these events are fired.
    If you have additional questions, 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. David Ching
    David Ching avatar
    11 posts
    Member since:
    Sep 2007

    Posted 27 Aug 2008 Link to this post

    Thank you so much, Nokolay, for taking the time to answer my question so well!  It works great.

    Perhaps this would be good tutorial to add?  "Creating an Outlook like frame".

    Thanks,
    David
  5. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 29 Aug 2008 Link to this post

    Thank you for the nice feedback, David!

    Indeed, it is a good idea to turn my response into a How-To tutorial. I will consider creating a Knowledge Base article for it and then add it to the documentation.

    If you have additional questions, 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.
  6. David Ching
    David Ching avatar
    11 posts
    Member since:
    Sep 2007

    Posted 29 Aug 2008 Link to this post

    Nikolay, the article would be great!

    BTW, for step #8, it is easier to activate the desired RadPanel in the Designer by choosing it from the combobox (at top of Properties pane), then right click on whitespace on the form (not on the panel) and choose Bring To Front.

    In one step you can activate the desired panel, and not have to set the Visibility properties of all the other panels.

    Cheers,
    David
  7. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 02 Sep 2008 Link to this post

    Hello David Ching,

    Thank you for the nice suggestion. I will consider including it in a future "How-to" tutorial.

    If you have additional ideas to share with me about our Help Documentation, I will be glad to process them further.

     
    All the best,
    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