Display()
Previous  Top  Next

:Display() - Show Progress Text with Display Object.

Syntax

:Display(<cText>) --> oDisplay  

Parameters

<cText>  
<cText> specifies the Text string to be displayed by the Display object.  

Returns

This method returns the current Display object, or NIL if no Display object is currently set.  

Description

Displays the specified <cText> by executing the Display object's appropriate method, either :SetCaption(), :SetTitle(), or :SetData(). For the possible results and the different behaviors with different types of Display objects, see the :Display instance variable documentation.  
 
If no valid Display object is specified, nothing is displayed!  

Example

Create a new XbpStatic object and then create a new XbZLibZip object and open an existing Zip File named "MyArchive.zip" in Test mode. If corrupted File Entries are found in the Zip File, specify the XbpStatic object as the Display object of the XbZLibZip object and display a message on the XbpStatic. Then close the Zip File and disable further output to the XbpStatic object:  

oXbp := XbpStatic():New():Create(oDraw, , aPos, aSize)  
oZip := XbZLibZip():New("MyArchive.zip", XBZ_OPEN_TEST)  
if oZip:Status == XBZ_FILE_CORRUPT  
   oZip:SetDisplayObject(oXbp)  
   oZip:Display('Corruption detected in File "MyArchive.zip"!')  
endif  
oZip:Close()