Skip to content

OnClick - cCJStatusBarPane

Event that is called when the user clicks on the statusbar pane

Type: Event

Syntax

Procedure OnClick

Description

The OnClick event is sent when the user clicks on the statusbar pane. It can be used however you wish.

Sample

In this sample, clicking on the oHideViewPane is used to hide or show the view pane.

Object oStatusBar is a cCJStatusBar

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

    Object oViewPane is a cCJStatusBarPane
        Delegate Set phoViewPane to Self
        Set pbStyleStretch to True
    End_Object

    Object oHideViewPane is a cCJStatusBarPane
        Set psText to "Hide View Pane"

        Procedure OnClick
            Boolean bVisible

            // toggle pbVisible of the view pane
            Get pbVisible of oViewPane to bVisible
            Set pbVisible of oViewPane to (not(bVisible))

            // change text of this pane to show what clicking will do
            Set psText to (If(bVisible,"Show View Pane","Hide View Pane"))

        End_Procedure

    End_Object

End_Object

See Also

OnDblClick