WireLess Studio Widgets Developer's Guide |
This methods enables or disables the display of the current battery life percent on a WS_LABEL widget.
VARIANT_BOOL DisplayBatteryLifePercentByName(LPCTSTR sObjectName, VARIANT_BOOL bDisplay);
VARIANT_BOOL DisplayBatteryLifePercentById(SHORT usObjectId, VARIANT_BOOL bDisplay);
On success, DisplayBatteryLifePercent returns TRUE, FALSE otherwise. To get extended information, call WStError::GetLastErrorCode.
The battery life percent is shown using the following format : "s: dd%", where s is the string currently being displayed by the widget and d is a digit.
using WirelessStudioOleWidgets; WStWidget oWidget = new WStWidget(); short iLabelId = 31; oFactory.CreateWidgetById((short)WSTFactoryConstants.WS_LABEL, iLabelId, "", 0,0, 50, 50, ""); oWidget.DisplayBatteryLifePercent(iLabelId, TRUE);
Public wsWidget As New WStWidget ...
'label Test 7: Current Battery life percent display wsWidget.DisplayBatteryLifePercentByName "labelTest7", True wsWidget.SetBackGroundColorByName "labelTest7", 167, 236, 171 ...
DisplayCurrentTime | Enable | ShowBorder
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 |