|
![]() |
![]() |
version 2003
PA_SetThermometerRect (rect)
Parameter | Type | Description | |
rect | PA_Rect | → | New rectangle of the thermometer |
Description
The command
PA_SetThermometerRect
sets the location where the thermometer displayed during time-consuming operations, such as sorts and searches, will appear.
The 4D plug-in fills the
PA_Rect
structure with the left, top, right and bottom coordinates (expressed in the global coordinates system) of the thermometer's window contents rectangle. Be sure to consider the height of the window's title bar when calculating the coordinates.
The location of the thermometer window is information that is local to each process and maintained until the process is terminated. If the 4D plug-in does not use this entry point, 4th Dimension includes its own algorithm to decide where the window will appear depending on the context and the operation whose progress is being displayed.
USER INTERFACE NOTE:
While the progress of a time-consuming operation is shown, the user may move the thermometer window by dragging its title bar. In this case, the thermometer will appear the nex time in the in the last location to which is was moved. It is a good programming habit to let the user choose where windows are displayed.
NOTE:
If the 4D plug-in changes the location of the thermometer and then wants to let 4th Dimension reverts to its own algorithm, call
PA_SetThermometerRect
again with an empty rect.
Keep in mind that the routine expects the complete
PA_Rect
structure to be passed and not a pointer to it as System APIs use.
Example
A 500 pixels square window for a thermometer.
void SortinBigWindow()
{
PA_Rect r = {30, 30, 530, 530};
PA_SetThermometerRect(r);
MySortALotOfRecords();
// Give back hand to 4D to manipulate the window
r.fTop = r.fLeft = r.fBottom = r.fRight = 0;
PA_SetThermometerRect(r);
}
See Also
PA_GetMessagesStatus , PA_Rect , PA_SetMessagesStatus .
Error Handling
Use
PA_GetLastError
to see if an error occurred.