WireLess Studio Widgets Developer's Guide |
Sets the background color of a specific item on a WS_LIST_CTRL widget.
VARIANT_BOOL SetRowBackgroundColorByName(LPCTSTR sObjectName, SHORT usRowIndex, SHORT usRed, SHORT usGreen, SHORT usBlue);
VARIANT_BOOL SetRowBackgroundColorById(SHORT usObjectId, SHORT usRowIndex, SHORT usRed, SHORT usGreen, SHORT usBlue);
On success, SetRowBackgroundColor returns TRUE, FALSE otherwise. To get extended information, call WStError::GetLastErrorCode.
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.SetRowBackgroundColorById(sListCtrlId, 0, 255, 0, 0);
iRows = wsWidget.GetItemCountByName("listCtrl") For i = 0 To iRows - 1 If i Mod 2 = 0 Then wsWidget.SetRowBackgroundColorByName "listCtrl", i, iRed, iGreen, iBlue End If Next i
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 |