This is a migrated thread and some comments may be shown as answers.

how to add arrow in the radButtonElement

7 Answers 131 Views
Panelbar (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Barkha
Top achievements
Rank 1
Barkha asked on 15 Oct 2007, 09:15 PM
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

7 Answers, 1 is accepted

Sort by
0
Jordan
Telerik team
answered on 16 Oct 2007, 04:11 PM
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
0
Barkha
Top achievements
Rank 1
answered on 16 Oct 2007, 11:54 PM
Thanks Jordan.

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

Thanks
barkha
0
Jordan
Telerik team
answered on 17 Oct 2007, 07:17 AM
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
0
Barkha
Top achievements
Rank 1
answered on 17 Oct 2007, 08:49 PM
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
0
Barkha
Top achievements
Rank 1
answered on 17 Oct 2007, 08:49 PM
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
0
Jordan
Telerik team
answered on 18 Oct 2007, 07:34 AM
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
0
Barkha
Top achievements
Rank 1
answered on 19 Oct 2007, 12:17 AM
Thanks. It was really helpful.
Tags
Panelbar (obsolete as of Q2 2010)
Asked by
Barkha
Top achievements
Rank 1
Answers by
Jordan
Telerik team
Barkha
Top achievements
Rank 1
Share this question
or