|
|
WireLess Studio Widgets Developer's Guide |
|
Call this method to retrieve the last event string value.
BSTR GetLastEventStrValue(void);
GetLastEventStrValue returns the string value of the last event received.
When a WS_FIELD widget triggers an event, the string value is the text typed by the user or the the barcode read. For a WS_MENU widget, the string value is the text of the selected option.
using WirelessStudioOleWidgets;
WStFactory oFactory = new WStFactory();
WStForm oForm = new WStForm ();
short formId = 10;
short fieldId = 15;
oFactory.CreateFormById(formId);
oFactory.CreateWidgetById((short)WSTFactoryConstants.WS_FIELD, fieldId, "myField", 15, 15, 30, 30, "Field");
oForm.AddObjectBydId(formId, buttonId);
oForm.ShowById(formId, true, true);
string sResult;
if( oForm.GetEvent() )
{
sResult = oForm.GetLastEventStrValue();
}
Public wsForm As New WStForm
...
Case "maxLengthField"
iMaxLength = wsForm.GetLastEventStrValue()
wsWidget.SetMaxLengthByName "field", iMaxLength
...
GetEvent | GetLastEventIntValue | GetLastEventSourceId | GetLastEventSourceName | GetLastEventType
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 |