Jump to content
Sign in to follow this  
olympus

Input Box Read-Only

Recommended Posts

olympus

When I use GuiCtrlCreateInput with $ES_READONLY, it turns the input box grey. Is there a way to stop it from changing colour?

Share this post


Link to post
Share on other sites
blckpythn

I haven't tested this but try using adding a variable to the beginning of it.

$var = GuiCtrlCreateInput etc

then below it add

$var = $GUI_ENABLE

again. i have not tested this

Share this post


Link to post
Share on other sites
Fire

Try this way :idea:

GUICtrlSetBkColor($Input1,0xFFFFFF)

More explanation :

#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=Form1.kxf
$Form1 = GUICreate("Form1", 633, 447, 192, 124)

$Input1 = GUICtrlCreateInput("Input1", 192, 104, 225, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
GUICtrlSetBkColor($Input1,0xFFFFFF)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

[size="5"] [/size]

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.