WireLess Studio Widgets Developer's Guide
WSWDG ContentsWStWidget class reference

ModifyStyle

Changes the current style for a WS_RADIO_BUTTON or WS_CHECK_BOX widget.

Ole declaration

VARIANT_BOOL ModifyStyleByName(LPCTSTR sObjectName, BYTE bStyle);

VARIANT_BOOL ModifyStyleById(SHORT usObjectId, BYTE bStyle);

Parameters
sObjectName
The name of the target widget.
usObjectId
The id of the target widget.
bStyle
The new style for the widget, this parameter can be one of the following:
Return Value

On success, ModifyStyle returns TRUE, FALSE otherwise. To get extended information, call WStError::GetLastErrorCode.

Remarks

The styles can be found on the WSTWidgetConstants enumeration.

Example
C#
using WirelessStudioOleWidgets;
WStWidget oWidget = new WStWidget();
WStFactory oFactory = new WStFactory();
short iRadioButtonId = 22;
oFactory .CreateWidgetById((short)WSTFactoryConstants.WS_RADIO_BUTTON, iRadioButtonId ,"", 0,0, 50, 50, "");
oWidget.ModifyStyleById(iRadioButton, (byte)WSTWidgetConstants.WS_STYLE_PUSH_LIKE);
Visual Basic 6 (Full Example: RadioButtonDemoModule.bas.txt)
Public wsWidget As New WStWidget
...
wsWidget.ModifyStyleByName "myRadioButton4", WS_STYLE_PUSH_LIKE
wsWidget.ModifyStyleByName "myRadioButton5", WS_STYLE_PUSH_LIKE
wsWidget.ModifyStyleByName "myRadioButton6", WS_STYLE_PUSH_LIKE
...
See also

GetState | SetState | SetGroupId

WStWiget class reference | WStForm class reference | WStFactory class reference | WStError class reference