Hi,
I use the mainFrameBarManager to create main menu and two toolbars.The toolbars are placed one next to another. I need to set the position of the second(left hand side) toolbar near the right edge of the form. Is there a way to set the bar position praogrammatically?I was playing with setting it''s .Left property on form''s resize, but the toolbar dissapeared then.
Regards,
Radoslaw
RS
Radoslaw Samlik
May 31, 2006 01:46 PM UTC
Well, I have found it myself :) Here is the solution:
this.mainFrameBarManager.GetCommandBarManager().LockBars();
this.mainFrameBarManager.GetBarControl(this.toolbarEnterProdID).Left = this.Right - this.mainFrameBarManager.GetBarControl(this.toolbarEnterProdID).Width;
this.mainFrameBarManager.GetCommandBarManager().UnLockBars();
RS
Radoslaw Samlik
May 31, 2006 02:04 PM UTC
Hmm... My mistake, it was something else - still does not work :/ Any ideas? Help appreciated :)
MJ
Mano J
Syncfusion Team
May 31, 2006 02:25 PM UTC
Hi Radoslaw,
The value of the Right property is equal to the sum of the Left property value and the Width property value.
Please try using the form''s width property alone instead of Right propert as shown below
this.mainFrameBarManager1.GetBarControl(this.toolbarEnterProdID).Left = this.Width - this.mainFrameBarManager1.GetBarControl(this.toolbarEnterProdID).Width;
Please let me know if this helps you.
Regards,
Mano