We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to position a toolbar on the 2nd row, through code?

Thread ID:





35833 Oct 11,2005 07:02 PM UTC Oct 12,2005 08:33 PM UTC WinForms 2
Tags: Tools
Dave Smith
Asked On October 11, 2005 07:02 PM UTC

Hi, In my application I''m not setting up my toolbars at design time. Instead, I''m instantiating the toolbars in code. For the most part, this works fine. However, all of my toolbars are appearing on the same row. There is only one row of toolbars, and it''s very crowded now -- it is so crowded that all of the toolbars are compressed. I would prefer to have half of my toolbars appear on the next row down. How can I specify a toolbar''s row position, using the API ? Again, we''re not setting up our toolbars in design mode (that''s a project requirement). Thanks

Administrator [Syncfusion]
Replied On October 12, 2005 01:12 PM UTC

Hi Dave, The toolbars can be arranged in different rows using the RowIndex and RowOffset property of CommandBar.I have attached a sample that illustrates this.Let me know if this meets your requirement. We appreciate your cooperation. Regards, Ebenezer.P


Dave Smith
Replied On October 12, 2005 08:33 PM UTC

Well, that helped a little. That does show me the syntax to use. If I can get the RowIndex and RowOffset properties to work correctly, then they will do what I need. Unfortunately, the sample code that you posted does not always run correctly. I downloaded your code, built that project and ran it (I ran it from within Visual Studio). I saw all the toolbars on the same row. Then I ran the project again (I didn''t modify anything, I just pressed Ctrl-F5 again) and that time, it did what it was supposed to do -- the second time I ran it, the code caused two of the toolbars to move down onto a new row. But the first time the application is run, the toolbars do not move as intended, so something is clearly not working. If you copy the project into a new directory, and build and run the project from there, then you will see that the first time you run it all the toolbars will be on the same row. In my own application, I''m finding that those properties work sometimes, and sometimes they have no effect. I have 5 toolbars currently. By setting the positioning properties, I have been able to specify the positions of 4 out of my 5 toolbars. The fifth toolbar insists on being placed at the end of the 2nd row of toolbars. It simply does not move to the first row of toolbars. Can you suggest any other things I should check? Is it possible I''m trying to set these RowIndex and RowOffst properties too early, or too late?


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon