|
Adding extra toolbar item in addition to the factory shipped items:
You can add items on any of the tool bars.
Please follow the following
Steps to add a custom Toolbar item:
Step:1 Click on the toolbar where you want to place the new item.

Step:2 From the context menu select the item you want to add.

Step:3 Select properties for this new toolbar item.

Step:4 Modify the properties according to your choice. For example here we changed the text of the toolbar button.

If you want to add your own buttons replacing any of the factory shipped buttons.
Within the Click Event handler of your custom button you can call any of the public
methods. You get complete freedom to customize the toolbars as well as the toolstrip items.
Example: There is no toolbar item in the factory item collection
for inserting html textbox. So, you want to add a button for inserting html textbox
at the caret position.
Solution: This control comes with a very useful method named InsertHtml. The signature
of this method is as follows:
public void
InsertHtml(string
HtmlText)
You can use this method to insert your desired html in the editor. To do this, please follow
the above mentioned steps to add your new button and attach a 'Click' Event Handler
method to this button. The following snippet shows the usage of this method for
inserting the textbox.

You can also call factory public methods from your own toolbar item. For example you need a customized button for
'Copy' operation, you can use this snippet

Learn about :
|