Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptsetparentwidget.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptsetparentwidget.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptsetparentwidget.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptsetparentwidget.html on line 8

PtSetParentWidget()

Set the current parent widget

Synopsis:

PtWidget_t *PtSetParentWidget( PtWidget_t *widget );

Library:

ph

Description:

This function sets the current parent widget. Some widget classes (for example, windows, lists and menus) call this function when they're created.


Note: Widgets that belong to the PtContainer class become the current parent widget when created. If you're creating multiple PtContainer-class widgets, you must ensure that each one is placed in the correct container.

To do this, either call PtSetParentWidget() or specify the appropriate widget in the parent argument to PtCreateWidget().

If the widget argument to PtSetParentWidget() is NULL and you then call PtCreateWidget() with a Pt_DEFAULT_PARENT parent argument, the new widget has no parent. It's easier to create a widget with no parent by calling PtCreateWidget() with a parent argument of Pt_NO_PARENT.


Returns:

A pointer to the previous parent widget, or NULL if there is none.

Examples:

See PtCreateWidget().

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtCreateWidget(), PtFindGuardian(), PtGetParent(), PtGetParentWidget(), PtReparentWidget(), PtValidParent(), PtWidgetParent()

Ordering widgets in the Managing Widgets in Application Code chapter of the Photon Programmer's Guide


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptsetparentwidget.html on line 131

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptsetparentwidget.html on line 131