cObject
---cStatusPane
This class is obsolete. Status Bars are now created using class cCJStatusBar.
As of revision 12.1, DataFlex includes full support for Codejock Software's COM Xtreme CommandBars package for creating menus, toolbars and statusbars. See Using Menus, Toolbars and Statusbars for more information.
Each instance of a cStatusPane class represents a single pane of a status bar. You embed them within an instance of the cStatusBar to display either text or an icon to the user.
You can set the text of a pane with the psLabel property or you can display an icon in the pane instead using the psIcon property. To align the text within the pane, use the peAlignment property.
Set the width of the pane with the piWidth property and draw a graphical edge around the pane with the peBevel property.
Object oStatusBar is a cStatusBar Object oStatusHelp is a cStatusPane Set piWidth To 350 End_Object Object oReadOnlyLabel is a cStatusPane Set piWidth To 80 Set psLabel To "ReadOnly:" Set peBevel To bsNone End_Object Object oReadOnly is a cStatusPane Set piWidth To 200 Set psLabel To "ReadOnly" Procedure OnClick // the pane was clicked, so do something End_Procedure End_Object End_Object
The panes allow you to use a shared-handler. For example, rather than handling the OnClick event within each pane, you could write a single handler at the statusbar that would receive the OnClick events for several panes. To do this, set this property to the message-handle of shared handler. When this happens, the pane will automatically pass the object-handle of the pane to the shared handler as the first parameter. The shared handler must be in the delegation path of the pane.
A frequent use of shared-handlers is when the panes are created dynamically and there is no local object definition to handle the event in.
This sample shows two panes using the same handler:
Object oStatusbar is a cStatusbar Procedure OnClickShared Integer hoPane Showln "OnClick happened in " (Name(hoPane)) End_Procedure Object oPane1 is a cStatusPane Set phmOnClick To msg_OnClickShared End_Object Object oPane2 is a cStatusPane Set phmOnClick To msg_OnClickShared End_Object End_Object