Disable a textbox?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
empardopo
Posts: 336
Joined: 06 Oct 2013, 12:50
Location: Spain
Contact:

Disable a textbox?

08 Oct 2013, 05:53

Is it possible to disable a textbox?

I have this source

Code: Select all

SetWorkingDir %A_ScriptDir%
Gui, Add, Text, x26 y30 w60 h20 +Center, Ancho
Gui, Add, Edit, x86 y30 w80 h20 vmonitorancho, 0
Gui, Show, x99 y98 h547 w854, Test
Return
I want disable the Edit object. Is it possible?

Thanks very much!
Everything is possible!
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: Disable a textbox?

08 Oct 2013, 05:55

Code: Select all

Gui, Add, Edit, x86 y30 w80 h20 ReadOnly vmonitorancho, 0
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
User avatar
empardopo
Posts: 336
Joined: 06 Oct 2013, 12:50
Location: Spain
Contact:

Re: Disable a textbox?

08 Oct 2013, 07:17

jNizM wrote:

Code: Select all

Gui, Add, Edit, x86 y30 w80 h20 ReadOnly vmonitorancho, 0
Excellent, thanks to you I tried also with Hide.

Another question. With this source

Code: Select all

SetWorkingDir %A_ScriptDir%
Gui, Add, Text, x26 y30 w60 h20 +Center, Ancho
Gui, Add, Edit, x86 y30 w80 h20 Readonly vmonitorancho, 0
Gui,Add, DropDownList, x86 y60 w240 h180 vcombox guyg AltSubmit,Red|Blue|Green|Yellow|Black|Violet
Gui, Show, x99 y98 h547 w854, Test
Return

uyg:
    GuiControlGet,combox

    if combox=1
    vmonitorancho = "Red"
    else
	    vmonitorancho = Black

    return
I want that when you select a value in the combobox, that value is copied to the textbox.
I don't know where I am wrong.

Thanks very much in advance.
Everything is possible!
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: Disable a textbox?

08 Oct 2013, 07:49

Code: Select all

SetWorkingDir %A_ScriptDir%
Gui, Add, Text, x26 y30 w60 h20 +Center, Ancho
Gui, Add, Edit, x86 y30 w80 h20 Readonly vMonitorancho, 0
Gui, Add, DropDownList, x86 y60 w240 h180 vCombox guyg,Red|Blue|Green|Yellow|Black|Violet
Gui, Show, x99 y98 h547 w854, Test
Return

uyg:
    GuiControlGet, Combox
    GuiControl,, Monitorancho, % Combox
return
with AltSubmit --> Combox = 1,2,3,....
without AltSubmit --> Combox = choosen value (Red,Blue,Green,...)

GuiControlGet = You get some infos from your Combox
GuiControl = You give some infos to your Edit
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
User avatar
empardopo
Posts: 336
Joined: 06 Oct 2013, 12:50
Location: Spain
Contact:

Re: Disable a textbox?

08 Oct 2013, 11:24

Thanks, thanks and thanks!!!!!
Everything is possible!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], Lpanatt and 313 guests