WireLess Studio Widgets Developer's Guide |
Sets the group id for a WS_RADIO_BUTTON widget. Radio buttons behavior depends on other radio buttons attached to the same form. To group radio buttons for a specific purpose each radio button must have the same group id.
VARIANT_BOOL SetGroupIdByName(LPCTSTR sObjectName, BYTE bGroupId);
VARIANT_BOOL SetGroupIdById(SHORT usObjectId, BYTE bGroupId);
On success, SetGroupId returns TRUE, FALSE otherwise. To get extended information, call WStError::GetLastErrorCode.
By default a radio button has no group assigned and it's behavior it's undefined: If two or more radio buttons are created in a sequentially way (and their group ids are not set), they may act as if they were in the same group (change of focus, change of state).
The group id can be set only once.
using WirelessStudioOleWidgets; WStWidget oWidget = new WStWidget(); WStFactory oFactory = new WStFactory(); short iMenuId = 15; oFactory .CreateWidgetById((short)WSTFactoryConstants.WS_MENU, iMenuId,"", 0,0, 50, 50, ""); oWidget.ChangeMenuTypeById(iMenuId, (short)WSTWidgetConstants.WS_COMBO_BOX_MENU_TYPE); oWidget.AddOption(iMenuId, 0, "Show Menu"); oWidget.AddOption(iMenuId, 0, "Save File"); oWidget.AddOption(iMenuId, 0, "Close Application");
Public wsWidget As New WStWidget Public wsFactory As New WStFactory ... 'Two radio button groups are defined wsWidget.SetGroupIdByName "myRadioButton", 1 wsWidget.SetGroupIdByName "myRadioButton2", 1 wsWidget.SetGroupIdByName "myRadioButton3", 1 InitRBGroup1 ("myRadioButton") InitRBGroup1 ("myRadioButton2") InitRBGroup1 ("myRadioButton3") wsWidget.SetGroupIdByName "myRadioButton4", 2 wsWidget.SetGroupIdByName "myRadioButton5", 2 wsWidget.SetGroupIdByName "myRadioButton6", 2 ...
SetState | ModifyStyle | GetState
WStWiget class reference | WStForm class reference | WStFactory class reference | WStError class reference
WireLess Studio by SofToGo S.A. | Visit our site www.softogo.com | Contact us help@softogo.com |