|This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.|
Set one resource for a widget
#define PtSetResource( widget, type, value, len ) …
This function sets a resource for the specified widget. The type argument contains the resource manifest and value contains the value of the argument being passed. The way the len argument is used depends on the resource type.
For information on getting and setting resources, see the Manipulating Resources in Application Code chapter of the Photon Programmer's Guide.
If the widget has been realized, changing its resources may change how it appears on the screen.
- The given resources was applied to the widget.
- The widget wasn't modified because it doesn't contain the given resource or the value of the resource was the same as that already stored in the widget.
Turn the widget blue:
PtWidget_t *widget; PtSetResource( widget, Pt_ARG_FILL_COLOR, Pg_BLUE, 0 );
Manipulating Resources in Application Code chapter of the Photon Programmer's Guide.