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

PtSetResource()

Set one resource for a widget

Synopsis:

#define PtSetResource( widget, type, value, len ) …

Library:

ph

Description:

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.

Returns:

0
The given resources was applied to the widget.
-1
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.

Examples:

Turn the widget blue:

PtWidget_t *widget; 

PtSetResource( widget, Pt_ARG_FILL_COLOR, Pg_BLUE, 0 );

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtArg_t, Pt_ARG(), PtGetResource(), PtGetResources(), PtSetArg(), PtSetResources()

Manipulating Resources 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/ptsetresource.html on line 129

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/ptsetresource.html on line 129