Operating systems, development tools, and professional services
for connected embedded systems
for connected embedded systems
![]() |
![]() |
![]() |
![]() |
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
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)