hi guys is it possible to add a custom control/tool in a toolbar.. like a custom ultratexteditor... thanks in advance.. :)
You can add your custom control to the form. Then add a ControlContainerTool to the toolbar and set its Control property to your custom control.
Could you give an example of adding to form then to ControlContainerTool?
Why do you need to add it to the form first?
You can right-click the toolbars manager at design-time and open the customize dialog. In the Tools tab, you can remove root tools.
and one more doubt reg tools...
i added 2 extra tools for testing...now i want to remove those tools ...is it possible to remove?
thanks,
vruk27
Mike ,
i resolved this by adding new lable tools one is spring one is space.
this.toolbarManager.Tools.Add(tool);
this.toolbarManager.Toolbars.AddToolbar("Toolbar");
this.toolbarManager.Toolbars[0].Tools.AddTool("SearchTool");
this.toolbarManager.Toolbars[0].Tools.AddTool("Space");
thanks for u r support....
vruk
i created the Searchtool and i am able to add it to the tool bar by using above code.but one thing is missing here is i want to setup that search tool right side.i mean iwant to add spring tool before that searchtool.this searchtool is my usercontrol.
My code is :
Please give me an idea to solve this issue.
You only need to add the control to the Form first if you are setting it up at design-time. You would need the control on the form so the list of choices for the Control property of ControlContainerTool had the control within it.
If you are setting things up at run-time, you can just create the control and set it on the Control property:
ControlContainerTool tool = new ControlContainerTool("TextBoxHolder");
this.ultraToolbarsManager1.Tools.Add(tool);
tool.Control = new TextBox();
this.ultraToolbarsManager1.Toolbars.AddToolbar("Toolbar");
this.ultraToolbarsManager1.Toolbars[0].Tools.AddTool("TextBoxHolder");