how to add arrow in the radButtonElement

8 posts, 0 answers
  1. Barkha
    Barkha avatar
    29 posts
    Member since:
    Oct 2007

    Posted 15 Oct 2007 Link to this post

    Hi ,

    I am using RadPanelBar and I have 2 RadButtonElement inside RadpanelBarGroupElement. I need to have an arrow pointer ( pointing to the right ) of the button whenever the user moves its mouse over it. This will help user to know which form is chosen on the right from these RadButtonElement.
    As an example:
    Please see any menu items that has arrow buttons on it when it contains submenus.
    I want the arrow to appear on the RadButtonelement only when its selected and the respective details are shown on the right side of the form.

    Any help on this is appreciated.

    Thanks
    barkha
  2. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 16 Oct 2007 Link to this post

    Hello barkha,

    You have two options for the arrow positioning:
    1. Use RadDropDownButtonElement in the following way:
    RadDropDownButtonElement dropDownButton = new RadDropDownButtonElement(); 
    dropDownButton.Text = "DropDown Button"
     
    this.radPanelBarGroupElement1.Items.Add(dropDownButton); 
     
    ClassSelector arrowSelector = new ClassSelector("RadArrowButtonArrow"); 
    ArrowPrimitive arrow = arrowSelector.GetSelectedElements(dropDownButton)[0] as ArrowPrimitive; 
    arrow.Direction = Telerik.WinControls.ArrowDirection.Right; 

    and hide the arrow when needed in the following way:

    arrow.Visibility = ElementVisibility.Hidden; 

             2. Derive a new class from RadButtonElement and add an ArrowPrimitive in the derived class

    We will be glad to assist you further with this. Do not hesitate to contact us if you have any additional questions.

    All the best,
    Jordan
    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. Barkha
    Barkha avatar
    29 posts
    Member since:
    Oct 2007

    Posted 16 Oct 2007 Link to this post

    Thanks Jordan.

    Also are there any sample examples of ClassSelector , ArrowPrimitive availaible to be downloaded?

    Thanks
    barkha
  5. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 17 Oct 2007 Link to this post

    Hi barkha,

    You should check whether our Knowledge Base already contains a solution for a problem that you are having.

    For a KB Article that demonstrates the usage of the ClassSelector you can consult this:

    http://www.telerik.com/support/kb/article/b454K-ttm-b454T-ckd-b454c-ckd.aspx

    Also, the Telerik CAB Enabling Kit contains a very good example of extending RadPanelBar using RadProperties:

    http://www.telerik.com/products/winforms/cab_support.aspx

    Hope that helps. If we could be of further service, please contact us.

    Regards,
    Jordan
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Barkha
    Barkha avatar
    29 posts
    Member since:
    Oct 2007

    Posted 17 Oct 2007 Link to this post

    Thanks Jordan for the information.

    As per the first approach in the following link:
    http://www.telerik.com/support/kb/article/b454K-ttm-b454T-ckd-b454c-ckd.aspx

    I am not clear with this part.
    " The class names (RadElement.Class property) of different elements in the UI hierarchy can be browsed, using the RadControlspy tool."

    Can you please elaborate how to find the class names. I somehow got lost in UI hierarchy and could not trace the class names for *RadPanelBar*.

    Thanks
    barkha
  7. Barkha
    Barkha avatar
    29 posts
    Member since:
    Oct 2007

    Posted 17 Oct 2007 Link to this post

    Thanks Jordan for the information.

    As per the first approach in the following link:
    http://www.telerik.com/support/kb/article/b454K-ttm-b454T-ckd-b454c-ckd.aspx

    I am not clear with this part.
    " The class names (RadElement.Class property) of different elements in the UI hierarchy can be browsed, using the RadControlspy tool."

    Can you please elaborate how to find the class names. I somehow got lost in UI hierarchy and could not trace the class names for *RadPanelBar*.

    Thanks
    barkha
  8. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 18 Oct 2007 Link to this post

    Hello barkha,

    For an introduction to the RadControlSpy you can watch this movie:

    http://www.telerik.com/ClientsFiles/product.videos/25/

    You can find out the value of the Class property for the currently selected element in the RadControlSpy by navigating to it in the PropertyGrid on the right.

    For more information on the element hierarchy and how a RadControl is composed you can check the help.

    Regards,
    Jordan
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  9. Barkha
    Barkha avatar
    29 posts
    Member since:
    Oct 2007

    Posted 18 Oct 2007 Link to this post

    Thanks. It was really helpful.
Back to Top
UI for WinForms is Visual Studio 2017 Ready