Diagram for .NET / User's Guide / WinForm Components / Status Bar

In This Topic
    Status Bar
    In This Topic
    The diagram status bar is represented by an instance of the NDiagramStatusBar class (derives from the Nevron User Interface NStatusBar). The visibility of the status bar can be controlled by the manager if the StatusBar property of the NDiagramCommandBarsManager is set to it.
    C#
    Copy Code
    // create a new manager and status bar
    NDiagramCommandBarsManager manager = new NDiagramCommandBarsManager();
    NDiagramStatusBar statusBar = new NDiagramStatusBar();
    
    ...
    
    // attach the status bar to the manager
    manager.StatusBar = statusBar;
    
    Visual Basic
    Copy Code
    ' create a new manager and status bar
    Dim manager As New NDiagramCommandBarsManager
    Dim statusBar As New NDiagramStatusBar
    
    ...
    
    ' attach the status bar to the manager 
    manager.StatusBar = statusBar
    

    The status bar is used to display important information about the state of a view, so you must explicitly connect it to a view:

    C#
    Copy Code
    // connect the status bar to a view
    statusBar.View = view;
    
    Visual Basic
    Copy Code
    ' connect the status bar to a view
    statusBar.View = view
    
     Status Bar Panels

    The diagram status bar consists of six panels. Following is their brief description:

    • Primary Panel - the primary panel is usually used to display the name of the currently active view tool.
    • Secondary Panel - the secondary panel is used to display some active tool specific information if there is an active tool. If there is no active tool it will display the bounds of the currently selected objects. If there are no selected objects it will display the snapped mouse position in document scene coordinates.
    • Mouse Position Panel - shows the current mouse position in document scene coordinates.
    • Measurement Unit Panel - shows the current document measurement unit.
    • Control Panel - displays the current state of the CTRL key.
    • Shift Panel -  displays the current state of the Shift key.
     Related Examples
    Windows Forms: Visual Interface Components - Status Bar
    See Also