WireLess Studio Widgets Developer's Guide |
Sets the current selected item on a WS_LIST_CTRL (an item is a row) or a WS_MENU (an item is an option) widget.
VARIANT_BOOL SetSelectedItemById(SHORT usObjectId, SHORT usItemIndex);
VARIANT_BOOL SetSelectedItemByName(LPCTSTR sObjectName, SHORT usItemIndex);
On success, SetSelectedItem returns TRUE, FALSE otherwise. To get extended information, call WStError::GetLastErrorCode.
This method is not supported by the WS_MENU widget if it's current menu type is WS_BUTTON_MENU_TYPE.
using WirelessStudioOleWidgets; WStWidget oWidget = new WStWidget(); short sListCtrlId= 4; oFactory.CreateWidgetById((short)WSTFactoryConstants.WS_LIST_CTRL, sListCtrlId, "", 0,0, 50, 50, ""); oWidget.AddColumById(sListCtrlId, 40, "Product Id"); oWidget.AddRowById(sListCtrlId, 0); oWidget.SetRowTextById(sListCtrlId, 0, 0, "33413"); oWidget.SetSelectedItemById(sListCtrlId, 0);
Public wsWidget As New WStWidget ... Case "selectedOptionField" iSelectedOption = wsForm.GetLastEventStrValue() wsWidget.SetSelectedItemByName "listBoxMenu", iSelectedOption wsWidget.SetSelectedItemByName "buttonMenu", iSelectedOption wsWidget.SetSelectedItemByName "comboBoxMenu", iSelectedOption ...
DeleteRow | SetRowIcon | AddRow | ClearRows | AddColumn | ClearColumns | GetSelectedItem | ReadRowsFromFile | GetItemCount | SetLoadMode
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 |