WireLess Studio Widgets Developer's Guide |
This method changes the color of the text displayed by a widget.
VARIANT_BOOL SetTextColorByName(LPCTSTR sObjectName, SHORT usRed, SHORT usGreen, SHORT usBlue);
VARIANT_BOOL SetTextColorById(SHORT usObjectId, SHORT usRed, SHORT usGreen, SHORT usBlue);
On success, SetTextColor returns TRUE, FALSE otherwise. To get extended information, call WStError::GetLastErrorCode.
The red, green and blue colors must be in the range 0-255, if the colors are not in this range each value will be truncated.
If this method is applied to a WS_LINE widget, the color of the line will be changed.
using WirelessStudioOleWidgets; WStWidget oWidget = new WStWidget(); WStFactory oFactory = new WStFactory(); short iLineId = 66; oFactory.CreateWidgetById((short)WSTFactoryConstants.WS_LINE, iLineId , "", 0,0, 50, 50, ""); oWidget.SetTextColor(iLineId, 255, 0, 128);
Public wsWidget As New WStWidget ... 'Changes the color of both top and bottom lines wsWidget.SetTextColorByName "topLine", 229, 229, 229 wsWidget.SetTextColorByName "bottomLine", 229, 229, 229 ...
SetBackgroundColor | SetBarColor | SetText | GetText
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 |