David Lack
4-Aug-2006, 03:30 AM
Hi Folks,
A quick class that can be used to popup a "Please wait" box. A quirk
to it is that if the waitbox object is not a child of the object that
calls it, it won't disappear on close_panel *if* called from the
Procedure Activating of the "main" view object. Sorry if that last
sentence is rather tortured!
Dave
================================================== ==========
// cWaitBox - DJL 03/08/2006
// Thanks to Erik Zimmerman in the VDF newsgroup for the idea
// of using a ToolPanel as the base. See:
//-------------------------------------------------
// From: "Erik Zimmerman" <erikz@compadmin.com>
// Subject: Re: A "Busy" box.
// Date: Fri, 28 Jul 2006 10:47:46 -0400
// Message-ID: <3DhUrTlsGHA.2072@dacmail.dataaccess.com>
// Newsgroups: visual-dataflex
Class cWaitBox Is A ToolPanel
Procedure Construct_Object
Forward Send Construct_Object
Set Locate_Mode To Smart_Locate
Set Size To 43 200
Set Caption_Bar To True
Set Label to "Please Wait"
Set Minimize_Icon To False
Set Maximize_Icon To False
Set Sysmenu_Icon To False
Set Color To clBtnFace
Set Border_Style To Border_Dialog
Object oWaitText is a Textbox
Set Label to "Message to display"
Set TextColor to clBlue
Set FontSize to 16 9
Set Location to 6 6
Set Size to 10 113
Set FontWeight to 800
Set TypeFace to "Arial"
End_Object // oTextBox1
End_Procedure
Procedure WaitBox String sLabel
Set Label of oWaitText to sLabel
Send Activate
End_Procedure
End_Class // cWaitBox
// At top of grid, above green line:
//=======================================
// Object oWaitBox Is A cWaitBox
// End_Object
// In the *same* grid object, when you fill the grid:
//================================================== ======
// Send WaitBox to oWaitBox "Searching customer database..."
// ..... do the fill grid stuff .....
// Send Close_Panel to oWaitBox
// If the oWaitBox object is not a child of the grid, it won't
// if the grid is called as part of Activating. God knows why.
================================================== ======
--
David Lack
FocusINet Ltd
dl@focusinet.com
Tel: 01453 753351
A quick class that can be used to popup a "Please wait" box. A quirk
to it is that if the waitbox object is not a child of the object that
calls it, it won't disappear on close_panel *if* called from the
Procedure Activating of the "main" view object. Sorry if that last
sentence is rather tortured!
Dave
================================================== ==========
// cWaitBox - DJL 03/08/2006
// Thanks to Erik Zimmerman in the VDF newsgroup for the idea
// of using a ToolPanel as the base. See:
//-------------------------------------------------
// From: "Erik Zimmerman" <erikz@compadmin.com>
// Subject: Re: A "Busy" box.
// Date: Fri, 28 Jul 2006 10:47:46 -0400
// Message-ID: <3DhUrTlsGHA.2072@dacmail.dataaccess.com>
// Newsgroups: visual-dataflex
Class cWaitBox Is A ToolPanel
Procedure Construct_Object
Forward Send Construct_Object
Set Locate_Mode To Smart_Locate
Set Size To 43 200
Set Caption_Bar To True
Set Label to "Please Wait"
Set Minimize_Icon To False
Set Maximize_Icon To False
Set Sysmenu_Icon To False
Set Color To clBtnFace
Set Border_Style To Border_Dialog
Object oWaitText is a Textbox
Set Label to "Message to display"
Set TextColor to clBlue
Set FontSize to 16 9
Set Location to 6 6
Set Size to 10 113
Set FontWeight to 800
Set TypeFace to "Arial"
End_Object // oTextBox1
End_Procedure
Procedure WaitBox String sLabel
Set Label of oWaitText to sLabel
Send Activate
End_Procedure
End_Class // cWaitBox
// At top of grid, above green line:
//=======================================
// Object oWaitBox Is A cWaitBox
// End_Object
// In the *same* grid object, when you fill the grid:
//================================================== ======
// Send WaitBox to oWaitBox "Searching customer database..."
// ..... do the fill grid stuff .....
// Send Close_Panel to oWaitBox
// If the oWaitBox object is not a child of the grid, it won't
// if the grid is called as part of Activating. God knows why.
================================================== ======
--
David Lack
FocusINet Ltd
dl@focusinet.com
Tel: 01453 753351