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

PtAddClassStyle()

Add a style to a widget class

Synopsis:

int PtAddClassStyle(
       PtWidgetClassRef_t * const ref,
       PtWidgetClassStyle_t *style );

Library:

ph

Description:

This function adds the given style to the specified widget class, ref. If a style of the same name already exists in the widget class, the contents of the new style replace the old style, and the new style is freed.


Note: To further manipulate the given style, you must get a new pointer to it by calling PtFindClassStyle() or PtGetWidgetStyle().

A style is a collection of override methods that can change how a widget looks and behaves. Styles can also add widget resources.

Returns:

The index of the style, or -1 if it couldn't be added.

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:

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

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/ptaddclassstyle.html on line 133

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/ptaddclassstyle.html on line 133