| Home | All functions | Categories |
vuPasswordInit(LONG, LONG, *CSTRING, *CSTRING), SIGNED, PASCAL, RAW, NAME('vuPasswordInit')
Registers a Clarion entry control for managed visibility behavior. This function automatically creates and manages a toggle button (eye icon) to the right of the control. It supports both masked password fields and unmasked fields such as login names.
The function prepares internal tracking for the control, sets the starting visibility mode, handles cue text, and optionally adds a tooltip to the generated button.
Stability Note: This function is idempotent. If called on a control that is already initialized, it will automatically perform a cleanup of the previous instance before re-applying the new settings. This prevents repeated subclassing and keeps the control stable during dynamic UI refreshes.
| Parameter | Data Type | Description |
|---|---|---|
| ControlHandle | LONG | Handle of the target control, typically passed as ?Control{PROP:Handle}. |
| InitialMode | LONG | Starting mode. Pass 0 to begin masked or 1 to begin in visible-text mode. |
| CueText | *CSTRING | Cue text to display when the field is empty. Pass a blank CSTRING if no cue text is wanted. |
| TooltipText | *CSTRING | Tooltip text for the generated button. Pass a blank CSTRING if no tooltip is wanted. |
0 = Success-1 = Internal memory allocation failureUse a fixed 4-parameter call from Clarion.
Even when you do not want cue text or tooltip text, you should still pass both referenced CSTRING parameters and initialize them to blank values.
This is the recommended calling pattern:
vuPasswordInit(LONG, LONG, *CSTRING, *CSTRING), SIGNED, PASCAL, RAW, NAME('vuPasswordInit')
LoginNameCue CSTRING(80)
LoginNameTip CSTRING(80)
LoginNameShowState LONG
RC LONG
LoginNameCue = 'Enter your login name'
LoginNameTip = 'Show / Hide Login Name'
LoginNameShowState = 0
RC = vuPasswordInit(?LoginName{PROP:Handle}, LoginNameShowState, LoginNameCue, LoginNameTip)
LoginPasswordCue CSTRING(80)
LoginPasswordTip CSTRING(80)
LoginPasswordShowState LONG
RC LONG
LoginPasswordCue = ''
LoginPasswordTip = ''
LoginPasswordShowState = 0
RC = vuPasswordInit(?LoginPassword{PROP:Handle}, LoginPasswordShowState, LoginPasswordCue, LoginPasswordTip)
CueText is blank, no cue text is drawn.TooltipText is blank, no tooltip is shown.| Home | All functions | Categories |