|
|
WireLess Studio Widgets Developer's Guide |
|
Call this method to change the background color of a specific form.
VARIANT_BOOL SetBackGroundColorByName(LPCTSTR sFormName, SHORT usRed, SHORT usGreen, SHORT usBlue);
VARIANT_BOOL SetBackGroundColorById(SHORT usFormId, SHORT usRed, SHORT usGreen, SHORT usBlue);
On success, SetBackgroundColor 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.
When the form's background color changes some widgets will try to change their background color to match the form new background color, the widgets that support this feature are: WS_BITMAP, WS_CHECKBOX, WS_LABEL, WS_LINE, WS_MENU (when it behaves as a button menu) and WS_RADIO_BUTTON. This feature only works if the background color is set before the form is serialized and displayed on the mobile unit.
using WirelessStudioOleWidgets; WStFactory oFactory = new WStFactory(); WStForm oForm = new WStForm (); short formId = 10; oFactory.CreateFormById(formId); oForm.SetBackGroundColorById(formId, 255, 0, 0);
Public wsForm As New WStForm
...
Public Sub ConfigWidgetColors()
wsForm.SetBackGroundColorByName "myForm", 255, 255, 255
...
End Sub
... 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 |