PtWidgetParent

PtWidgetParent — finds the parent of a widget.

Syntax

PtWidgetParent (widget)

		

Arguments

widget

Any widget.

Returns

The parent widget, if one exists, otherwise nil.

Example

Gamma> PtInit(nil);
t
Gamma> win = new(PtWindow);
window instance
Gamma> pane = new(PtPane);
pane instance
Gamma> label = new(PtLabel);
label intance
Gamma> PtWidgetParent(label) == pane;
t
Gamma> PtWidgetParent(pane) == win;
t
Gamma> PtWidgetParent(win);
nil