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/ptreparentwidget.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/ptreparentwidget.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/ptreparentwidget.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/ptreparentwidget.html on line 8

PtReparentWidget()

“Reparent” a widget to a new container

Synopsis:

int PtReparentWidget( PtWidget_t *widget,
                      PtWidget_t *parent );

Library:

ph

Description:

This function takes the specified widget from its current parent and gives it to the specified parent. The parent must be a container widget.

Returns:

0
Success.
-1
The widget couldn't be reparented.

Examples:

PtWidget_t  *label, *window1, *window2;

/* create widget within window1 */
...
label = PtCreateWidget( PtLabel, window1, 5, args );

/* use widget within window1 */
...

/* reparent label to window2 */
PtReparentWidget( label, window2 );

/* use widget within window2 */
...

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtCreateWidget(), PtFindGuardian(), PtGetParent(), 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/ptreparentwidget.html on line 127

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/ptreparentwidget.html on line 127