Skip to content

Class: cCJStatusBar

Properties | Events | Methods | Index of Classes

Use to create a statusbar in a commandbar system.

Hierarchy

Library: Windows Application Class Library
Package: cCJCommandBarSystem.pkg

Description

The cCJStatusBar object is used to create and manage a statusbar within a commandbar system. Only one statusbar object can be used within a commandbar system. The statusbar object must be a child of the cCJCommandBarSystem object. A statusbar is comprised of a series of panes which are maintained by creating child [cCJStatusbarPane](cCJStatusBarPane.md) objects.

Object oCommandBarSystem is a cCJCommandBarSystem

    Object oMenuBar is a cCJMenuBar
        :    
    End_Object

    Object oFindToolBar is a cCJToolbar
        :    
    End_Object

    Object oFileToolBar is a cCJToolbar
        :    
    End_Object

    Object oStatusBar is a cCJStatusBar

        Object oStatusIdle is a cCJStatusBarPane
            Set piId to sbpIDIdlePane
            Set pbStyleStretch to True
        End_Object

        Object oStatusView is a cCJStatusBarPane
            Set phoViewPane to Self
            Set pbStyleStretch to True
        End_Object

        Object oStatusCaps is a cCJStatusBarPane
            Set piId to sbpIDCapslock
        End_Object

    End_Object

End_Object  

Using Menus, Toolbars, and Statusbars

The statusbar interface is simple. Its main purpose is to manage the statusbar panes. You can determine if a statusbar is visible with the [pbVisible](cCJStatusBar-Property-pbVisible.md) property. You can determine how disabled text in panes is displayed with the [pbDrawDisabledText](cCJStatusBar-Property-pbDrawDisabledText.md) property.

The framework sends two special update messages to the statusbar.

  • [Show_Status_Help](cCJStatusBar-Procedure-Show_Status_Help.md) is sent any time a focus changes. It is passed the appropriate status help for the new focus object. The statusbar will display this text in the pane determined to be the Idle Pane. An idle pane is identified by setting the pane's cCJStatusbarPane.piID value to sbpIDIdlePane. In addition to showing the Show_Status_Help, it displays the cCJAction.psDescription text whenever a menu or tool item is hovered over. Normally, the idle text pane will be the first pane.

  • [Show_View_Name](cCJStatusBar-Procedure-Show_View_Name.md) is sent any time the view focus changes, passing the name of the new view. If the phoViewPane property is set, the text will be set in that pane.

Container classes in which status bars are typically used, the [StatusBar_Id](FloatingPanel-Property-StatusBar_Id.md) is automatically configured. For container classes which typically do not contain status bars, you need to set this property manually.

Object oCJCommandBarSystem1 is a cCJCommandBarSystem
    Object oCJStatusBar1 is a cCJStatusBar
        Object oCJStatusBarPane1 is a cCJStatusBarPane
            Set pbStyleStretch to True
            Set piId to sbpIDIdlePane
        End_Object

        Set StatusBar_Id to Self
    End_Object
End_Object  

The Statusbar Update Process

If the cCJCommandbar's idle-timer is enabled ([pbTimerUpdate](cCJCommandBarSystem-Property-pbTimerUpdate.md)), the [OnUpdate](cCJStatusBar-Event-OnUpdate.md) event will be sent to the status bar on an idle timed basis. This can be used to update statusbar pane information any way you wish. Note that OnUpdate is not sent to the individual pane objects - it is expected that you will control these updates within the Statusbar object itself.

The Statusbar Creation Process

When the commandbar system is created, the message [CreateComInstance](cCJStatusBar-Procedure-CreateComInstance.md) is sent to the cCJStatusBar object. This method is used to:

  1. Create the COM statusbar.
  2. Send the appropriate COM messages.
  3. Send the [OnCreate](cCJStatusBar-Event-OnCreate.md) event. This can be used by developers to customize the creation process.
  4. Create all child statusbar pane objects.

Once the COM object is created, it remains statically bound to its cCJStatusbar proxy object.

See Also