User Interface for .NET / User's Guide / Custom Controls / StatusBar

In This Topic
    StatusBar
    In This Topic
     Overview

     

     

    Nevron status bar overrides the standard Windows Forms one and extends its appearance greatly. A new NStatusBarPanel object is provided with additional customization properties like BackColor, ForeColor, ImageIndex and BorderStyle and embedded controls support.

     Customizing Status Bar

    As the NStatusBar is both INRendererProvider and INPaletteProvider its customization is very rich and easy to extend. Additional ImageList property is provided, which makes it more convenient to associate an image with a panel. You can also control the style of grip via the GriperStyle property.

     

    The following example demonstrates how to create a status bar and customize its appearance:

    C#
    Copy Code
    NStatusBar statusBar = new NStatusBar();
    statusBar.Palette.Scheme = ColorScheme.LunaBlue;
    statusBar.GriperStyle = GripperStyle.Lines;
    
    Visual Basic
    Copy Code
    Dim statusBar As NStatusBar = New NStatusBar()
    statusBar.Palette.Scheme = ColorScheme.LunaBlue
    statusBar.GriperStyle = GripperStyle.Lines
    
     Customizing Panels

    Nevron User Interface exposes a new custom NStatusBarPanel object which derives from StatusBarPanel and provides lots of customization properties.

     

    The following example demonstrates how to create a NStatusBar control and add panels to it:

    C#
    Copy Code
    NStatusBar statusBar = new NStatusBar();
    statusBar.ImageList = this.imageList1;
    
    //create two panels and add them to the status bar
    NStatusBarPanel panel = new NStatusBarPanel();
    panel.BorderStyle = BorderStyle3D.Raised;
    panel.BackColor = Color.Silver;
    panel.ForeColor = Color.White;
    statusBar.Panels.Add(panel);
    
    //create a panel with autosize spring and a progressbar on it
    panel = new NStatusBarPanel();
    panel.AutoSize = StatusBarPanelAutoSize.Spring;
    panel.Control = this.nProgressBar1;
    panel.BorderStyle = BorderStyle3D.None;
    statusBar.Panels.Add(panel);
    
    Visual Basic
    Copy Code
    Dim statusBar As NStatusBar = New NStatusBar()
    statusBar.ImageList = Me.imageList1
    
    'create two panels and add them to the status bar
    Di panel As NStatusBarPanel = New NStatusBarPanel()
    panel.BorderStyle = BorderStyle3D.Raised
    panel.BackColor = Color.Silver
    panel.ForeColor = Color.White
    statusBar.Panels.Add(panel)
    
    'create a panel with autosize spring and a progressbar on it
    panel = New NStatusBarPanel()
    panel.AutoSize = StatusBarPanelAutoSize.Spring
    panel.Control = Me.nProgressBar1
    panel.BorderStyle = BorderStyle3D.None
    statusBar.Panels.Add(panel)
    
     Remarks
    The NStatusBar control provides the same functionality as the standard Windows Forms one but looks much more professional and smooth(flicker-free).