Articles in this section
Category / Section

How to add a new toolbar item programmatically?

1 min read

 

The following code illustrates how to programmatically add a toolbar item to the ToolBar.

C#

ToolBarItem newitem = new ToolBarItem();

newitem.ID = "New";

newitem.AppearanceMode = EAppearanceMode.ImageOnly;

newitem.ButtonType = EButtonType.Regular;

newitem.ImageURL = "new.gif";

newitem.ToolTip = "New";

toolbar1.Items.Add (newitem);

VB

Dim newitem As ToolBarItem = New ToolBarItem

newitem.ID = "New"

newitem.AppearanceMode = EAppearanceMode.ImageOnly

newitem.ButtonType = EButtonType.Regular

newitem.ImageURL = "new.gif"

newitem.ToolTip = "New";

toolbar1.Items.Add(newitem)

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied