[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
MsgMeter( bAction, cMsg, cTitle )-> <nil>
------------------------------------------------------------------------------
PARAMETER:
<bAction> Is a codeblock to evaluate while the meter evolves. It
receives four parameters :
<oMeter> is a reference to the oMeter (TMeter) object
<oText> is a reference to the oText (TSay) object.
You can use oText:SetText( cNewText ) to change
its contains while the meter evolves
<oDlg> is a reference to the oDlg (TDialog) object
<@lEnd> is a logical value passed by reference. You can
exit the dialog by setting it to TRUE.
<cMsg> This is the text to be placed at the MsgMeter dialog box, by
default it is "Processing..."
<cTitle> Is the title of the DialogBox, "Please, wait" by default
DESCRIPTION:
MsgMeter simplifies the process of creating and displaying a dialog box
with a progressing meter ( odometer ). This is normally used to provide
some user notification and interaction when you are reindexing a table,
installing files or doing operations that requires the user to wait until
the process is finished, or cancel the process by pressing the CANCEL
button.
EXAMPLE:
+--------------------------------------------------------------+
| /* Reindex with an odometer */ |
| USE customer NEW SHARED |
| MsgMeter( {|o1,o2,o3,l4| Build(o1,o2,o3,@l4)},"Indexing") |
| DBCLOSEAREA() |
| RETURN nil |
| |
| /* Function BUILD */ |
| FUNCTION BUILD( oMeter, oText, oDlg, lEnd ) |
| oMeter:nTotal := LastRec() |
| INDEX ON FIELD->last TO Customer ; |
| EVAL( oMeter:set( RECNO()), sysRefresh(), !lEnd ) |
| RETURN nil |
| |
+--------------------------------------------------------------+
SOURCE:
SOURCE\FUNCTION\MSGMETER.PRG
See Also:
MsgGet
MsgYesNo
MsgBeep
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson