Jump to content

$ES_PASSWORD character limit?


Recommended Posts

Maybe this is intentional, but I have a problem with an input box using the $ES_PASSWORD extended style. It will not allow me to type more characters than will fit in the visible box.

The box itself will fit 9 characters, and then I get a windows "default beep" sound if I try to type past that visible number. Other input boxes in the same GUI which do not have the $ES_PASSWORD style do not have this limitation. I can type as many characters as I want. I commented out the extended style to see if there was something else limiting it, and was able to type as many characters as I wanted.

Is there a reason for this behavior? The windows login screen does not act the same way, so I don't think it is a default windows behavior. Is there any way around it? I'd prefer not to have to lengthen the input box. Thanks.

Link to comment
Share on other sites

It happens on any GUI I create. Here's a test I just created:

#include <GUIConstants.au3>
Dim $main, $userlabel, $passlabel, $userinput, $passinput

$main = GUICreate("Test",200,125)
$userlabel = GUICtrlCreateLabel("Username",20,20,50,20)
$passlabel = GUICtrlCreateLabel("Password",20,50,50,20)
$userinput = GUICtrlCreateInput("",100,20,75,20)
$passinput = GUICtrlCreateInput("",100,50,75,20,$ES_PASSWORD)


While 1

Func Close()
Link to comment
Share on other sites

  • Developers

default style for Input is: $ES_LEFT, $ES_AUTOHSCROLL

So this should work:

$passinput = GUICtrlCreateInput("",100,50,75,20,BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))


Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
Live for the present,
Dream of the future,
Learn from the past.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...