RadPanelBarGroupElement Click event

3 posts, 0 answers
  1. Derek
    Derek avatar
    104 posts
    Member since:
    Aug 2008

    Posted 19 Jan 2009 Link to this post

    Hi,
    Is it possible to add a handler for the RadPanelBarGroupElement Click event?  I don't want to have Items, just the group. Also id there a way to disable the expand/collapse images?

    Thanks. 
  2. Derek
    Derek avatar
    104 posts
    Member since:
    Aug 2008

    Posted 20 Jan 2009 Link to this post

    Any Ideas? I'm very close to purchasing the controls but I'm struggling a little.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 21 Jan 2009 Link to this post

    Hi Derek,

    Thanks for writing and for your interest in RadControls for WinForms.

    1. It is possible to achieve your goal regarding the RadPanelBarGroupElement Click. However, currently we have an issue with directly firing the event for this element. We were not aware of this issue, so thank you for bringing our attention to it.

    Until this issue is addressed, please refer to the following code snippet as a workaround:

    private void RadPanelBar_MouseUp(object sender, MouseEventArgs e) 
        RadElement element = this.radPanelBar1.ElementTree.GetElementAtPoint(e.Location); 
     
        if (element is RadPanelBarVisualElement) 
        { 
             for (int i = 0; i < this.radPanelBar1.Items.Count; i++) 
             { 
                   if (this.radPanelBar1.Items[i].ControlBoundingRectangle.Contains(e.Location)) 
                   { 
                         MessageBox.Show("Clicked on: " + this.radPanelBar1.Items[i].Text);                             
                   } 
              } 
         } 

    I am using the MouseUp event of the RadPanelBar. When this event is fired I am getting the RadPanelBarGroupElement on which the mouse was on and I am showing a MessageBox with the text of the group.

    2. If you want to hide the collapse/expand images of the RadPanelBarGroupElements you could use the Edit UI elements action from the smart tag of the RadPanelBarGroupElement in the Visual Studio Designer:

    Open the designer and select a RadPanelBarGroupElement. Open its smart tag and click on the Edit UI elements action. In the Element hierarchy editor use the TreeView on the left to find the Telerik.WinControls.UI.RadPanelBarCaptionButton element and select it. Use the Property Grid on the right and find the DisplayStyle property. Set it to "Text" - you will no longer see the expand/collapse image of the RadPanelBarGroupElement.

    I hope this will help you. Your Telerik points are updated for reporting the 'Click'  issue.

    I would be grateful if you could share with us your impressions regarding our controls. New ideas and suggestions are always welcome!

    Do not hesitate to write back if you need further assistance or have additional questions.

    Sincerely yours,
    Deyan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top