| WideStudio Index |
Table of contents
How to get the parent instanceYou can get the parent instance with the method: WSCbase::getParent().
In the following sample, it acquires the parent instance which places the instance "obj", and set False to the visibility of the parent.let event_procedure obj = (* get the parent instance. *) let parent = obj -> getParent () (* access the parent instance. *) in parent -> "setVisible" ( _False ); () let _ = Callback.register "event_procedure" event_procedure
How to get the parent top level windowYou can get the parent window instance with the method: getParentWindow().
In the following sample, it acquires the parent window instance, and pops down the window. Sometimes this scene is found when closing window by a button instance.let event_procedure obj = (* get the parent window. *) let win = obj -> getParentWindow () (* pop-down the window. *) in win -> setVisible ( (get_int _False) ); () let _ = Callback.register "event_procedure" event_procedure
|Copyright(C) WideStudio Development Team, 1999-2005||Last modified: Jan 05, 2005|