|
|
WireLess Studio Widgets Developer's Guide |
|
This method retrieves the number of items displayed by a WS_LIST_CTRL (an item is a row) or a WS_MENU (an item is an option) widget.
SHORT GetItemCountById(SHORT usObjectId);
SHORT GetItemCountByName(LPCTSTR sObjectName);
On success, GetItemCount returns the number of items that are being displayed in the widget. On error, returns -1. To get extended information, call WStError::GetLastErrorCode.
using WirelessStudioOleWidgets;
WStWidget oWidget = new WStWidget();
RFFile oFile = new RFFile();
short sListCtrlId= 4;
oFactory.CreateWidgetById((short)WSTFactoryConstants.WS_LIST_CTRL, sListCtrlId, "", 0,0, 50, 50, "");
oWidget.AddColumById(sListCtrlId, 40, "Product Id");
oFile.RFTransferFile("../SamplesWidgets\Exe\Resources\data.txt", oFile.GetRemoteTempFolder() + "\data.txt", True);
oWidget.SetLoadModeById(sListCtrlId, (short)WSTWidgetConstants.WS_LIST_CTRL_LOAD_FROM_FILE);
oWidget.ReadRowsFromFileById(sListCtrlId, "../SamplesWidgets\Exe\Resources\data.txt", sRemoteTempFolder + "\data.txt");
short itemCount = oWidget.GetItemCountById(sListCtrlId);
SetRowText | DeleteRow | SetRowIcon | AddRow | ClearRows | AddColumn | ClearColumns | GetSelectedItem | SetLoadMode | ReadRowsFromFile | SetSelectedItem
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 |