The getParentByType searches the widget hierarchy up and returns the first widget found of the requested type.
Syntax | widget.getParentByType(wtype); |
---|---|
Parameters | wtype : Required. The name of the constructor function of the widget you are searching for. |
Returns | Object Widget or null. |
var win = widget.getParentByType(Window);
This example demonstrates how to get the window in which a widget is contained.