|
|
WireLess Studio Widgets Developer's Guide |
|
Returns the text displayed by a widget.
BSTR GetTextByName(LPCTSTR sObjectName);
BSTR GetTextById(SHORT usObjectId);
On success, GetText returns the text displayed by the target widget, otherwise returns an empty string. To get extended information, call WStError::GetLastErrorCode.
using WirelessStudioOleWidgets; WStWidget oWidget = new WStWidget(); WStFactory oFactory = new WStFactory(); short iFieldId = 33; oFactory.CreateWidgetById((short)WSTFactoryConstants.WS_FIELD, iFieldId, "", 0,0, 50, 50, "123"); string sText = oWidget.GetTextByid(iFieldId);
Public wsWidget As New WStWidget
...
Select Case sObjectName
Case "field"
wsWidget.SetTextByName "EventResult", "New input: " + wsWidget.GetTextByName("field")
wsWidget.SetTextByName "field", ""
...
SetText | GetXCoord | GetWidth | GetHeight | SetPosition | SetSize
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 |