WireLess Studio Widgets Developer's Guide
WSWDG ContentsWStForm class reference

GetLastEventSourceName

Call this method to retrieve the name of the widget that triggered the last event.

Ole declaration

BSTR GetLastEventSourceName(void);

Parameters
Return Value

GetLastEventSourceName returns the name of the widget that triggered the last event. If no events has been received, GetLastEventSourceName returns an empty string.

Remarks
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);

string sEventSource;
if( oForm.GetEvent() )
{
	sEventSource = oForm.GetLastEventSourceName();
}
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 | GetLastEventIntValue | GetLastEventType

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