Category / Section
How to change the position of toolbars at runtime?
1 min read
Change the position of toolbars at runtime
You can change the position of toolbars using RowIndex and RowOffset properties of MainFrameBarManager as follows.
C#
this.mainFrameBarManager1.GetBarControl(this.bar1).RowIndex = 0; this.mainFrameBarManager1.GetBarControl(this.bar2).RowIndex = 0; this.mainFrameBarManager1.GetBarControl(this.bar3).RowIndex = 0; this.mainFrameBarManager1.GetBarControl(bar1).RowOffset = 2; this.mainFrameBarManager1.GetBarControl(bar2).RowOffset = 0; this.mainFrameBarManager1.GetBarControl(bar3).RowOffset = 1; this.mainFrameBarManager1.GetCommandBarManager().RecalcLayout();
VB
Me.mainFrameBarManager1.GetBarControl(Me.bar1).RowIndex = 0 Me.mainFrameBarManager1.GetBarControl(Me.bar2).RowIndex = 0 Me.mainFrameBarManager1.GetBarControl(Me.bar3).RowIndex = 0 Me.mainFrameBarManager1.GetBarControl(bar1).RowOffset = 2 Me.mainFrameBarManager1.GetBarControl(bar2).RowOffset = 0 Me.mainFrameBarManager1.GetBarControl(bar3).RowOffset = 1 Me.mainFrameBarManager1.GetCommandBarManager().RecalcLayout()