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

add toolbar button dynamically

1 Answer 48 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Ivy
Top achievements
Rank 1
Ivy asked on 21 Sep 2013, 05:11 AM
I am struggling to create a toolbar button dynamically. Can someone please help me with this? I would like to create a main toolbar with a set of buttons created inside it. 

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 21 Sep 2013, 05:36 AM
Hi Ivy,

Please check the following C# code.

C#:
EditorToolGroup main = new EditorToolGroup();
RadEditor1.Tools.Add(main);
 
EditorTool bold = new EditorTool();
bold.Name = "Bold";
bold.ShortCut = "CTRL+B";
main.Tools.Add(bold);
 
EditorTool italic = new EditorTool();
italic.Name = "Italic";
italic.ShortCut = "CTRL+I";
main.Tools.Add(italic);
 
EditorTool underline = new EditorTool();
underline.Name = "Underline";
underline.ShortCut = "CTRL+U";
main.Tools.Add(underline);

Hope this helps,
Shinu.
Tags
Editor
Asked by
Ivy
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or