What would be a better control for a status bar type of control: a XPToolBar, a Toolbar with a BarManager, or a CommandBar?
Basically I would like to get a 'Office XP' style, flat status bar with 3 sections.
ADAdministrator Syncfusion Team June 4, 2002 12:00 PM
There are a number of things you can do here.
If all you need is 3-sections with flat look, then I recommend that you use the StatusBar control and owner draw the panels to get the flat-look. Owner drawing a 1 line border should be very easy. There should some code in our WinForms FAQ that should help you with this. Search for "StatusBar".
If you do decide to take this approach and if you app also has XPMenus or uses command bars, then put the StatusBar inside a CommandBar, so that the other commandbars and toolbars in your app will show above the status bar.
If you are using XPMenus in your app, add a "detached command bar" to the manager into which you can place a StatusBar. Take a look at the MainFrameBarManager.DetachedCommandBars property reference.
Make sure to set the AlwaysLeadingEdge property to true for the command bar.
If on the other hand, if you need to place some controls into the toolbar, use a commandbar (with the above settings) containing a Panel with DockStyle.Fill. Then within this Panel place a StatusBar to the right (for the gripper) and whatever Control(s) you need to the left. You might have to do some layout management during resisizng here. Use our FlowLayout, if necessary. The resultant UI should look pretty neat.
DPDavid PalauJune 5, 2002 01:18 PM
Thanks. I found an example in C#. For what it is worth, I converted and tweaked it for our project in VB.NET. I included the source if anyone is interested.
I followed the route of actually having a CommandBar docked at the bottom that contains my flat status bar, but I can't seem to make the CommandBar *always* stay at the bottom. I can drag other toolbars and make them dock below the CommandBar (which pushes the status bar up). Any idea how I can always make the CommandBar be at the bottom?
PSPrakash S Syncfusion Team June 5, 2002 07:36 PM
Setting the statusbar CommandBar's CommandBar.AlwaysTrailingEdge property to TRUE will make it non-floatable and force it to always remain at the bottom of the particular dock border(the bottom border in this case). To get the complete StatusBar effect, you might also want to set the CommandBar.HideGripper, CommandBar.HideDropDownButton, CommandBar.HideChevron and CommandBar.OccupyFullRow properties to TRUE.