SetDisplayObject()
|
Previous Top Next |
:SetDisplayObject(<oDisplay>) --> oOldDisplay
|
<oDisplay>
|
<oDisplay> specifies an XbpPartHandler()-based GUI object that might be derived from either XbpStatic(), XbpDialog(), XbpTreeView(), or XbpMLE() -- or any object that has either a :SetCaption(), :SetTitle(), or :SetData() method.
|
This method returns the previously set Display object, or NIL if no Display object was previously set.
|
Sets the (new) Display object and enables progress updates to it. For the different types of possible Display objects and how they are used by the :Display() method, see the :Display instance variable documentation. If the specified Display object is not valid -- because it has a wrong XbpPartHandler():Status() or does not support at least one of the required methods -- it will not be accepted, and no progress updates will be displayed!
|
Create a new XbpTreeView object and a new XbZLibZip object, and specify the XbpTreeView object as the Display object of the XbZLibZip object. Then open an existing Zip File named "MyArchive.zip" in Test mode, which will enable the display of the complete test and its result in the TreeView, and then close the Zip File and disable further output to the XbpTreeView object:
|
oXbp := XbpTreeView():New():Create(oDraw, , aPos, aSize)
|
oZip := XbZLibZip():New()
|
oZip:SetDisplayObject(oXbp)
|
oZip:Open('MyArchive.zip', XBZ_OPEN_TEST)
|
oZip:Close()
|