Module Statpnl.pkg
StatPnl.pkg - creates the standard status_panel object.
This is the default Status Panel object used by any of the Visual DataFlex classes that
invoke the standard status panel. The standard has always been that the package name
is StatPnl.pkg and the name of the object is Status_Panel. As of 12.0, there are major
changes in the way the status panel operates The Sentinel based external status panel used in
prior revisions has been replace with status panel that is part of the application.
This should work much better and faster than the old sentinel based solution.
While the way this operates has changed, the interface has not and therefore this should work
with most applications.
As of 12.0, we have added a global handle that contains the object ID of this status panel.
This variable ghoStatusPanel can be used in place of the object name Status_Panel. This provides
a cleaner more robust interface.
Compatibility Note:
When used in the standard way, this change will require no changes. A developer will only need to
change their code if they've modified the sentinel program, which was a difficult thing to do.
If for some reason you application will not work using this as a replacement for the old status
panel, you've probably done something special with the old status-panel. If you don't want to
figure out how to use the new one and you want to continue using the old one you are going to need
to add some code to include the old status panel in your application. Add the following to your project (your src).
Use StatPnl.pkg // Make sure you load the new status panel object first. this is not optional!
Use OldStatPnl.pkg // load the old status panel. Status_Panel is now this old object
If you do this, you will lose access to the new status-panel via Status_Panel. However, you
can still access the new object via the ghoStatusPanel handle.
Creating your own Status Panel objects
If a developer wishes to create a custom panel, they should use this package as their template.
This panel can be visually modeled and changed any way you wish. Just save your new custom panel
with a different file and object name and direct your status panel request to the new object.
If the new panel changes the interface and updates objects that are not currently defined, you
want to make sure you send the message ProcessEvents after you've updated the object. This allows
the object to paint when inside of a tight loop. For example, if you wanted to add a progress
bar (cProgressBar) you would want to Send ProcessEvents after you update the progress bar.
e.g.
Procedure UpdateStatusBar
Send DoAdvance of oProgressBar
Send ProcessEvents
End_Procedure
Of course, if you use the standard interfaces in status bar and your forward send these
messages this will be done for you.
the standard Interface for status panels are:
Send Initialize_StatusPanel - initializes values for caption, title & message
Send Start_StatusPanel - start the status panel
Send Stop_StatusPanel - stop the status panel
Send Update_StatusPanel - update the status panel's action area
Get Check_StatusPanel - check for cancel (if cancel or pbCancel is set, close the panel)
Get/Set Caption_Text - updates the caption bar
Get/Set Title_Text - updates the title area
Get/Set Message_Text - updates the Message area
Get/Set Action_Text - updates the action area
Get/Set Button_Text - updates the button area
Get/Set Allow_cancel_state - determines if panel can be canceled
Send EnableCancelButton - code you should provide to enable/disable cancel button
ghoStatusPanel - global handle that points to the standard status panel.
Statpnl.pkg (view source)- import declarations
- IntegerghoStatusPanel
- Status_Panel : cProcessStatusPanel
- oTitleTxt : TextBox
- oMessageTxt : TextBox
- oActionTxt : TextBox
- oStopButton : Button
- OnClick()
- Set(string sText)
These messages bind the standard cProcessStatusPanel interface to the actual
objects defined within this instance of the status panel.
note: all of the messages that change text should be forwarded
as the forwarded messages allows the panel to paint when in a tight loop
- stringMessage_Text()
- Set(string sText)
- stringAction_Text()
- Set(string sText)
- stringButton_Text()
- Set(string sText)
- stringTitle_Text()
- EnableCancelButton(boolean bEnable)
gets called when status panel is activated passing whether a button
should appear
References (3):
Field References (0):
Module | Containing Symbol | Line |
---|