Invisible the Group Drop Down

3 posts, 1 answers
  1. Ching-Yen
    Ching-Yen avatar
    65 posts
    Member since:
    Nov 2007

    Posted 25 Apr 2008 Link to this post

    hi,

    When we select the style of the PanelBar to OutlookNavPane, it will show a "group drop down" where the user can "add/remove" button...

    May I know how can we hide this button (I do not want the user to edit the layout)

    Please advice.

  2. Kiril
    Admin
    Kiril avatar
    158 posts

    Posted 28 Apr 2008 Link to this post

    Hello Ching-Yen,

    Thank you for writing.

    You can hide the button in the OutlookNavPane view using the line below, assuming your RadPanelBar control is named radPanelBar1:

    ((

    RadPanelBarOverFlow)radPanelBar1.RootElement.Children[0].Children[0].Children[1]).DropDownButton.Visibility = ElementVisibility.Collapsed;

    I hope this helps. If you have any additional questions, please contact me again.


    Best wishes,
    Kiril
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Answer
    Kiril
    Admin
    Kiril avatar
    158 posts

    Posted 29 Apr 2008 Link to this post

    Hello Ching-Yen,

    Just a quick follow up on the RadPanelBar code I sent you to hide the button.

    In order to make sure the button does not appear in certain scenarios, please subscribe to the ControlAdded event of the RadPanelBar, and set the visibility of the button to Hidden (as opposed to Collapsed in the code I sent you before). You have to set the Visibility of the button to Hidded in the form constructor.

    Please use the code below:

    private

    void Form1_Load(object sender, EventArgs e)
    {
    radPanelBar1.ControlAdded += new ControlEventHandler
    (radPanelBar1_ControlAdded);

    ((RadPanelBarOverFlow)radPanelBar1.RootElement.Children[0].Children[0].Children[1]).DropDownButton.Visibility = Telerik.WinControls.ElementVisibility.Hidden;

    }

    void

    radPanelBar1_ControlAdded(object sender, ControlEventArgs e)
    {
    ((
    RadPanelBarOverFlow)radPanelBar1.RootElement.Children[0].Children[0].Children[1]).DropDownButton.Visibility = Telerik.WinControls.ElementVisibility
    .Hidden;
    }


    If you have additional questions, please contact me again.

    Regards,
    Kiril
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top