Jump to content

Making GUIInputs "Grey" (Not able of inputting)


 Share

Recommended Posts

Ok, basically what i want to do is display a 'Inputbox', without making people able of typing anything in it, it would be usefull if it would become grey etc (text still visible)

$Pancake = GUICtrlCreateInput("Pancake", x, y, x, y)

$Pie = GUICtrlCreateInput("Pancake", x2, y2, x2, y2) <-- Lets say that one should be grey.

Thanks in advance, Gnu/GeekS.

Link to comment
Share on other sites

Like this....

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

GUICreate("")

$Pancake = GUICtrlCreateInput("Pancake", 20, 20, 100, 20)
$Pie = GUICtrlCreateInput("Pancake", 20, 50, 100, 20) ; <-- Lets say that one should be grey.
GUICtrlSetState( -1, $GUI_DISABLE)
GUISetState()


While GUIGetMsg() <> -3
WEnd

8)

Great, was just what i needed. Fast and usefull. Thanks :P
Link to comment
Share on other sites

GeekS

Why not just set the $ES_READONLY style :P

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>

GUICreate("")

$Pancake = GUICtrlCreateInput("Pancake", 20, 20, 100, 20)
$Pie = GUICtrlCreateInput("Pancake", 20, 50, 100, 20, BitOR($ES_LEFT, $ES_AUTOHSCROLL, $ES_READONLY))

GUISetState()

While GUIGetMsg() <> -3
WEnd
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
 Share

  • Recently Browsing   0 members

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