WireLess Studio Widgets Developer's Guide
WSWDG ContentsWStForm class reference

GetLastEventIntValue

Call this method to retrieve the last event integer value.

Ole declaration

LONG GetLastEventIntValue(void);

Parameters
Return Value

GetLastEventIntValue returns the integer value of the last event received.

Remarks

When a WS_MENU or a WS_LIST_CTRL widget triggers an event, the event integer value is the zero based index of the selected option/item.

For a WS_RADIO_BUTTON widget, the event integer value specifies the current state. The available states can be found here.

When a function key event is triggered, the function key pressed is saved in the event integer value. This value is also stored on the text of the Function Keys Controller widget.

For a WS_FIELD widget, the event integer specifies the last input type, for more information see GetLastInputType().

Example
C#
using WirelessStudioOleWidgets;
WStFactory oFactory = new WStFactory();
WStForm oForm = new WStForm ();
short formId = 10;
short radioButtonId = 15;
oFactory.CreateFormById(formId);
oFactory.CreateWidgetById((short)WSTFactoryConstants.WS_RADIO_BUTTON, radioButtonId, "", 15, 15, 30, 30, "Radio Button 1");
oForm.AddObjectBydId(formId, radioButtonId);
oForm.ShowById(formId, true, true);

int iLastValue = 0;
if( oForm.GetEvent() )
{
	iLastValue = oForm.GetLastEventIntvalue();
}
Visual Basic 6 (Full Example: FieldDemoModule.bas.txt)
Public wsForm As New WStForm
...
bResult = wsForm.GetEvent()
      iIntValue = wsForm.GetLastEventIntValue()
      sObjectName = wsForm.GetLastEventSourceName()
...
See also

GetEvent | GetLastEventStrValue | GetLastEventSourceId | GetLastEventSourceName | GetLastEventType

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