WireLess Studio Widgets Developer's Guide |
This method adds an removes display modes on a WS_FIELD widget.
The display modes affect the way in which the text is displayed on the widget.
VARIANT_BOOL ModifyDisplayModeByName(LPCTSTR sObjectName, LONG lRemove, LONG lAdd);
VARIANT_BOOL ModifyDisplayModeById(SHORT usObjectId, LONG lRemove, LONG lAdd);
On success, ModifyDisplayMode 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 display modes are:
WS_FIELD_DM_ECHO_ASTERISK and WS_FIELD_DM_MULTILINE are not compatible. If both modes are added, only WS_FIELD_DM_MULTILINE will be activated.
The display 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 WS_FIELD_DM_ECHO_ASTERISK display mode, the WS_FIELD widget replaces the string "123" for "***" */ oWidget.ModifyDisplayModeById(iFieldId, 0, (short)WSFieldConstants.WS_FIELD_DM_ECHO_ASTERISK);
Public wsWidget As New WStWidget ... Case "passwordCheckBox" If wsForm.GetLastEventIntValue() = WS_STATE_CHECKED Then wsWidget.ModifyDisplayModeByName "field", 0, WS_FIELD_DM_ECHO_ASTERISK Else wsWidget.ModifyDisplayModeByName "field", WS_FIELD_DM_ECHO_ASTERISK, 0 End If ...
ModifyInputMode | ModifyInputDevices | 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 |