Profile Picture

How to display all toolbars on a single row?

Posted By Niranjan Singh 11 Years Ago
Author
Message
Niranjan Singh
Posted 11 Years Ago
View Quick Profile
Forum Member

Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 49, Visits: 179
I am adding custom toolbars to Diagram control and want to arrange them in a single rather than two row.

Here is code for adding toolBars:

private void CreateToolbar()
{
NControlHelper.BeginUpdate(commandBarManager.ParentControl);
toolBarBuilder = commandBarManager.ToolbarsBuilder;
diagramCommander = commandBarManager.Commander;

NDockingToolbar originalToolStrip = commandBarManager.Toolbars[4];
//Assigning Action tools
NDockingToolbar layoutToolStrip = commandBarManager.Toolbars[6];

commandBarManager.Toolbars.Clear();

Nevron.UI.WinForm.Controls.NCommand command;

NDockingToolbar toolbar = new NDockingToolbar(commandBarManager);
//Adding only required tools from originalToolStrip and layoutToolStrip
toolbar.Commands.Add(originalToolStrip.Commands[1]);
toolbar.Commands.Add(originalToolStrip.Commands[14]);
toolbar.Commands.Add(layoutToolStrip.Commands[1]);
toolbar.Commands.Add(layoutToolStrip.Commands[2]);
command = new NCommand(new NCommandProperties() { Text = "MY Custom Button",
ID = toolbar.Commands.Count + 1, Designable = true, Name= "Custom Text",
Style = CommandStyle.Text });


NDockingToolbar toolbar1 = new NDockingToolbar(commandBarManager);
toolbar1.Commands.Add(command);
commandBarManager.Toolbars.Add(toolbar);
commandBarManager.Toolbars.Add(toolbar1);
}

Then how can i put them in single row or another type of toolbar class should be used??

Attachments
Toolbar orientation.png (136 views, 9.00 KB)



Similar Topics


Reading This Topic