NDockingToolBar Position


Author
Message
saurabh shukla
saurabh shukla
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)
Group: Forum Members
Posts: 5, Visits: 1

Hi all,

I am new to C# & want to set position of NDockingToolBar at run time.

I have read some post to set it & also got code snippet but it was in VB.

Can anybody please tell me code snippet in C# or how can we fix its location at each start of VS?

Thanks in Advance

--

Saurabh


Angel Chorbadzhiev
Angel Chorbadzhiev
Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)
Group: Forum Members
Posts: 139, Visits: 184

Hi Saurabh,

Basically, you can set the desired row NDockingToolbar to appear by setting its RowIndex property and also if there are more than one NDockingToolbar or NMenuBar with same row index the position of the NDockingToolbar in the row. The second order depends of the order of the NDockingToolbars in the NCommandBarsManager.Toolbars collection.

Let's say that you have one NMenuBar and two NDockingToolbars and you want the menu bar to be on the first row and both toolbars to be on the same row but second toolbar to be first on that row and first one to be second.

Then you should do the following:

nMenuBar1.RowIndex = 0;

nCommandBarsManager1.Toolbars.Remove(nDockingToolbar1);

nCommandBarsManager1.Toolbars.Remove(nDockingToolbar2);

nCommandBarsManager1.Toolbars.Add(nDockingToolbar2);

nCommandBarsManager1.Toolbars.Add(nDockingToolbar1);

nDockingToolbar1.RowIndex = 1;

nDockingToolbar2.RowIndex = 1;

 

I hope this example will give you better understanding how to set the position of your NDockingToolbars.

Regards,

Angel.

 


saurabh shukla
saurabh shukla
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)
Group: Forum Members
Posts: 5, Visits: 1

Hi Angel,

Thanks for the quick reply.

I was in need to search RowIndex property.

Thanks again.


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search