Set one or more resources for a widget
int PtSetResources( PtWidget_t *widget, int n_args, PtArg_t const *args );
This function sets resources for the specified widget. The args array indicates which resources to set, and n_args indicates the number of items in the args array. Before calling this function, you must initialize the args array with PtSetArg() or Pt_ARG().
|If you're setting only one resource, it's easier to call PtSetResource().|
For more information, 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.
|A return code of 0 doesn't necessarily mean that all the resources were successfully set. The only way to be sure that a resource was set is to set it, then get it and compare the values.|
Turn the widget blue and highlight it:
PtArg_t args; PtWidget_t *widget; PtSetArg( &args, Pt_ARG_FILL_COLOR, Pg_BLUE, 0 ); PtSetArg( &args, Pt_ARG_FLAGS, Pt_HIGHLIGHTED, Pt_HIGHLIGHTED ); PtSetResources( widget, 2, args );
PtArg_t, Pt_ARG(), PtGetResource(), PtGetResources(), PtSetArg(), PtSetResource()
Manipulating Resources in Application Code chapter of the Photon Programmer's Guide.