WireLess Studio Widgets Developer's Guide
WSWDG ContentsWStForm class reference

GetLastEventStrValue

Call this method to retrieve the last event string value.

Ole declaration

BSTR GetLastEventStrValue(void);

Parameters
Return Value

GetLastEventStrValue returns the string value of the last event received.

Remarks

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.

Example
C#
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();
}
Visual Basic 6 (Full Example: FieldDemoModule.bas.txt)
Public wsForm As New WStForm
...
Case "maxLengthField"
                iMaxLength = wsForm.GetLastEventStrValue()
                wsWidget.SetMaxLengthByName "field", iMaxLength
...	
See also

GetEvent | GetLastEventIntValue | GetLastEventSourceId | GetLastEventSourceName | GetLastEventType

WStWiget class reference | WStForm class reference | WStFactory class reference | WStError class reference