WireLess Studio Widgets Developer's Guide |
Enables the "Submit mode" on a widget.
When the "Submit mode" is enabled and the widget triggers an event, all the WS_FIELD widgets attached to the same form are forced to trigger their input events, sending the text that are currently displaying. This occurs only if the field's text has changed and it hasn't been sent before to the server. The widget's event is processed after the input events are sent.
VARIANT_BOOL EnableFlatStyleByName(LPCTSTR sObjectName, VARIANT_BOOL bEnable);
VARIANT_BOOL EnableFlatStyleById(SHORT usObjectId, VARIANT_BOOL bEnable);
EnableSubmitMode returns TRUE on success, FALSE otherwise. To get extended information, call WStError::GetLastErrorCode.
The event type senty by a WS_FIELD is always WS_EVENT_TEXT_INPUT, but this behavior can be modified and force the widget to sent a different event type if it is forced to trigger its input event. In order to change the default behavior you have to change the client configuration, the parameter UseTextSubmitEvent in the _EVENTS section must be set to "Yes". So, when a WS_FIELD is forced to trigger its input event, it will send a WS_EVENT_TEXT_SUBMIT event instead of a WS_EVENT_TEXT_INPUT.
using WirelessStudioOleWidgets; WStWidget oWidget = new WStWidget(); WStFactory oFactory = new WStFactory(); short sButtonId = 4; oFactory.CreateWidgetById((short)WSTFactoryConstants.WS_BUTTON, sButtonId, "", 0,0, 50, 50, ""); oWidget.EnableSubmiteModeById(iButtonId, TRUE);
Public wsWidget As New WStWidget Public wsFactory As New WStFactory .. 'Enables the submit mode on the main button, the texts of the ' msgBoxText and msgBoxCaption fields will be sent before ' the click event on the showMessageBoxBtn is processed wsWidget.EnableSubmitModeByName "showMessageBoxBtn", True ...
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 |