Sign in to follow this  
Followers 0
mikeqf

$ES_PASSWORD character limit?

5 posts in this topic

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.

Share this post


Link to post
Share on other sites



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

#include <GUIConstants.au3>
Opt("GUIOnEventMode",1)
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)

GUISetOnEvent($GUI_EVENT_CLOSE,"Close")
GUISetState(@SW_SHOW,$main)

While 1
    Sleep(100)
WEnd

Func Close()
    Exit
EndFunc

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Didn't realize that the $ES_PASSWORD cancelled out the default styles. Thanks!

Share this post


Link to post
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
Sign in to follow this  
Followers 0