WireLess Studio Widgets Developer's Guide |
This method adds an removes modes related to the input devices used on a mobile application, on a WS_FIELD widget.
The device modes allows to activate and deactivate certain features of the scanner and keyboard.
VARIANT_BOOL ModifyInputModeByName(LPCTSTR sObjectName, LONG lRemove, LONG lAdd);
VARIANT_BOOL ModifyInputModeById(SHORT usObjectId, LONG lRemove, LONG lAdd);
On success, ModifyInputDevices returns TRUE, FALSE otherwise. To get extended information, call WStError::GetLastErrorCode.
Modes to be added or removed can be combined by using the bitwise OR ( | ) operator.
The available device modes are:
The modes can be found on the WSFieldConstants enumeration.
using WirelessStudioOleWidgets; WStWidget oWidget = new WStWidget(); WStFactory oFactory = new WStFactory(); short iFieldId = 33; oFactory.CreateWidgetById((short)WSTFactoryConstants.WS_FIELD, iFieldId, "", 0,0, 50, 50, "123"); /* Using the following combination of flags, the keyboard is disabled so the input must be done by using the scanner*/ oWidget.ModifyInputDevicesById(iFieldId, 0, (short)WSFieldConstants.WS_FIELD_ID_DISABLE_KEY);
Public wsWidget As New WStWidget ... Case "disableScanCheckBox" If wsForm.GetLastEventIntValue() = WS_STATE_CHECKED Then wsWidget.ModifyInputDevicesByName "field", 0, WS_FIELD_ID_DISABLE_SCAN Else wsWidget.ModifyInputDevicesByName "field", WS_FIELD_ID_DISABLE_SCAN, 0 End If ...
ModifyInputMode | ModifyDisplayMode | ModifyLenCtrlMode | SetKeyboardMode | SetScannerConfigFile | SetMaxLength | GetLastInputType | GetLastBarcodeType
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 |