Jump to content
Sign in to follow this  
gcue

inputbox - CAPS as default case?

Recommended Posts

gcue

i read the help and i think the only default type is password type.

is there a way to make the default case CAPS - any ideas?

thanks much

Share this post


Link to post
Share on other sites
monoceres

This is a bit ugly, but it works:

Opt("GUIOnEventMode",1)
Global $string=""
GUICreate("Hello",300,200)
$edit=GUICtrlCreateEdit("",10,10,280,180)
GUISetOnEvent(-3,"close")
GUISetState()
while 1
    If $string<>GUICtrlRead($edit) Then
        GUICtrlSetData($edit,StringUpper(GUICtrlRead($edit)))
        $string=GUICtrlRead($edit)
    EndIf
    
    sleep(10)
WEnd

FUnc close ()
Exit
EndFunc

:)


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites
Triblade

I guess your talking about the GUICtrlCreateInput or GUICtrlCreateEdit ?

Maybe GUICtrlSetData($input, StringUpper(GUICtrlRead($input))) ?

Edit: Mono you beat me again!! Bleh! *sticks tongue out*

Edited by Triblade

My active project(s): A-maze-ing generator (generates a maze)

My archived project(s): Pong3 (Multi-pinger)

Share this post


Link to post
Share on other sites
gcue

thank you fellas!

works =)

Share this post


Link to post
Share on other sites
Triblade

Or the easy way...

#include <GUIConstants.au3>
GUICreate("Hello",300,200)
$edit=GUICtrlCreateEdit("",10,10,280,180,BitOR($GUI_SS_DEFAULT_EDIT,$ES_UPPERCASE))
GUISetState()

Do
    $nMsg = GUIGetMsg()
Until $nMsg = $GUI_EVENT_CLOSE
Heh, I give... This one's way better :)

My active project(s): A-maze-ing generator (generates a maze)

My archived project(s): Pong3 (Multi-pinger)

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  

×