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

RadCollapsiblePanel and Shortcuts

2 Answers 54 Views
CollapsiblePanel
This is a migrated thread and some comments may be shown as answers.
Abbas
Top achievements
Rank 1
Abbas asked on 25 Jan 2016, 08:37 AM

Hi Telerik team,

What would be the best way to assign a shortcut key to a CollapsiblePanel?

 The down below lines did not work for me!.

RadShortcut shortcut1 = new RadShortcut(Keys.None, Keys.F4);<br>            this.radCollapsiblePanel1.RootElement.Shortcuts.Add(shortcut1);<br>or<br>            this.radCollapsiblePanel1.CollapsiblePanelElement.Shortcuts.Add(shortcut1);<br>


Thanks,
Abbas

2 Answers, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 26 Jan 2016, 01:12 PM
Hello Abbas,

Thank you for writing.

Our Assigning Global RadShortcuts help article demonstrates a approach how to add shortcuts which will generate a Click event for that item, allowing you to perform specific action, associated with that item: http://docs.telerik.com/devtools/winforms/shortcuts/assigning-global-radshortcuts

Here is a sample code snippet demonstrating how to assign a shortcut to the collapse/expand button in RadCollapsiblePanel:
RadShortcut shortcut1 = new RadShortcut(Keys.None, Keys.F4);
this.radCollapsiblePanel1.CollapsiblePanelElement.HeaderElement.HeaderButtonElement.Shortcuts.Add(shortcut1);

I hope this information helps. Should you have further questions I would be glad to help.
 
Regards,
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Abbas
Top achievements
Rank 1
answered on 26 Jan 2016, 01:59 PM
Thanks a lot. :)
Tags
CollapsiblePanel
Asked by
Abbas
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Abbas
Top achievements
Rank 1
Share this question
or