Function Reference


_GUICtrlEdit_SetPasswordChar

Sets or removes the password character for an edit control

#include <GuiEdit.au3>
_GUICtrlEdit_SetPasswordChar ( $hWnd [, $sDisplayChar = "0"] )

Parameters

$hWnd Control ID/Handle to the control
$sDisplayChar [optional] The character to be displayed in place of the characters typed by the user
If this parameter is zero, the control removes the current password character and displays the characters typed by the user

Return Value

None.

Related

_GUICtrlEdit_GetPasswordChar

Example

#include <GUIConstantsEx.au3>
#include <GuiEdit.au3>
#include <MsgBoxConstants.au3>

Example()

Func Example()
        ; Create GUI
        GUICreate("Edit Get/Set Password Char (v" & @AutoItVersion & ")", 400, 300)
        Local $idEdit = GUICtrlCreateInput("Test of build-in control", 2, 2, 394, 25, $ES_PASSWORD)
        GUISetState(@SW_SHOW)

        MsgBox($MB_SYSTEMMODAL, "Information", "Password Char: " & _GUICtrlEdit_GetPasswordChar($idEdit))

        _GUICtrlEdit_SetPasswordChar($idEdit, "$") ; change password char to $

        MsgBox($MB_SYSTEMMODAL, "Information", "Password Char: " & _GUICtrlEdit_GetPasswordChar($idEdit))

        _GUICtrlEdit_SetPasswordChar($idEdit) ; display characters typed by the user.

        MsgBox($MB_SYSTEMMODAL, "Information", "Password Char: " & _GUICtrlEdit_GetPasswordChar($idEdit))

        ; Loop until the user exits.
        Do
        Until GUIGetMsg() = $GUI_EVENT_CLOSE
        GUIDelete()
EndFunc   ;==>Example