![]() | Programming Guide | WideStudio Index Table of contents |
How to get the children of the instance
You can get the children which the instance contains with the following method.
The method Description WSCbase getChildInstance( string ) Returns the child by the instance name How to get the child by the specified name
You can get the child by the specified name with the method: getChildInstance()let event_procedure obj = (* get the child which name is "newvbtn_001" *) let child = obj -> getChildInstance ("newvbtn_001") in if (get_int (child) <> 0) then (* the child exists. *) ignore(child -> setVisible ( _True )); () let _ = Callback.register "event_procedure" event_procedureIn the example, getChildInstance() seeks the child which name is "newvbtn_001" from the instance: "obj" recursively, and returns it if finds or returns nil if not.
Copyright(C) WideStudio Development Team, 1999-2005 | Last modified: Jan 05, 2005 |