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

PtSetWidgetStyle()

Set the current style for a widget

Synopsis:

int PtSetWidgetStyle( PtWidget_t *widget,
                      char *name );

Library:

ph

Description:

This function causes the provided widget to use the style called name from its widget class's style set.

If there isn't a style called name, this function creates a duplicate of the default style and calls the copy name. The widget then references this new style. If at a later time you modify the style, all widgets referencing it reextent (resize) and redraw themselves.


Note: You can also set the style for a widget instance by setting its Pt_ARG_STYLE resource (defined by PtBasic). Setting this resource has the same effect as calling PtSetWidgetStyle().

Returns:

The index of the style selected.

Examples:

See Widget Styles in the Managing Widgets in Application Code chapter of the Photon Programmer's Guide.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtAddClassStyle(), PtCreateClassStyle(), PtDupClassStyle(), PtFindClassStyle(), PtGetStyleMember(), PtGetWidgetStyle(), PtSetClassStyleMethods(), PtSetStyleMember(), PtSetStyleMembers()

Pt_ARG_STYLE resource of PtBasic in the Photon Widget Reference

Widget Styles 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/ptsetwidgetstyle.html on line 136

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/ptsetwidgetstyle.html on line 136