WireLess Studio Widgets Developer's Guide |
Call this method to wait for a single user input on a widget.
Almost every widget can trigger an event: A click, text input or a function key (For more information see GetLastEventType).
VARIANT_BOOL GetEvent(void);
On success, GetEvent returns TRUE, FALSE otherwise. To get extended information, call WStError::GetLastErrorCode.
When a new event is received, a few values are filled with information about the event. Those values can be retrieved by calling the methods GetLastEventStrValue, GetLastEventIntValue, GetLastEventSourceId, GetLastEventSourceName and GetLastEventType.
GetEvent calls CommitChanges on the form that is currently being shown before waiting for a new event.
using WirelessStudioOleWidgets; WStFactory oFactory = new WStFactory(); WStForm oForm = new WStForm (); short formId = 10; short lineId = 15; oFactory.CreateFormById(formId); oFactory.CreateWidgetById((short)WSTFactoryConstants.WS_LINE, lineId , "MyLine", 15, 15, 30, 30, ""); oForm.AddObjectBydId(formId, lineId ; oForm.SaveToTerminalById(formId); oForm.ShowById(formId, true, true); oForm.GetEvent();
Public wsForm As New WStForm ... bResult = wsForm.ShowByName("myForm", True, True) 'Waits for an event and performs an action While (bEnd = False And bResult) bResult = wsForm.GetEvent() If wsForm.GetLastEventSourceName() = "exitButton" Or _ wsForm.GetLastEventSourceName() = "WSFunctionKeysController" Then bEnd = True End If Wend ...
GetLastEventStrValue | GetLastEventIntValue | GetLastEventSourceId | GetLastEventSourceName | GetLastEventType | Show | SaveToTerminal | CommitChanges
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 |