Gui > dropdown and starting a new column of controls Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Naitsirk
Posts: 40
Joined: 15 Feb 2022, 03:50

Gui > dropdown and starting a new column of controls

Post by Naitsirk » 27 Sep 2022, 13:32

I am trying to make a gui with some drop downs.

However I am unable to start a new column of controls resulting in something not very pretty.

Code: Select all

^1::
Gui, Destroy
Gui, Add, Text,, Dropdown 1
Gui, Add, Text,, Dropdown 2
Gui, Add, Text,, Dropdown 3
Gui, Add, DropDownList, vDropdown1, Hi|Hello|Yo| 
Gui, Add, DropDownList, vDropdown2, 1|2|3d| 
Gui, Add, DropDownList, vDropdown3, A|B|C|
Gui, Add, Button, default, OK  ; The label ButtonOK (if it exists) will be run when the button is pressed.
Gui, Show,, Test gui
return  ; End of hotkey subroutine.

GuiClose:
ButtonOK:
Gui, Submit  ; Save the input from the user to each control's associated variable.
Return
I've tried to add a "ym" somewhere in the line:

Code: Select all

Gui, Add, DropDownList, vDropdown1, Hi|Hello|Yo|
but have been quite unsuccessful.

What am I doing wrong?

Thanks so much in advance.

AHKStudent
Posts: 1472
Joined: 05 May 2018, 12:23

Re: Gui > dropdown and starting a new column of controls

Post by AHKStudent » 27 Sep 2022, 13:41

Here is a link to autoGUI viewtopic.php?t=10157

Code: Select all

; Generated by AutoGUI 2.2.5a
#NoEnv
#SingleInstance Force
SetWorkingDir %A_ScriptDir%

Gui Add, Text, x41 y33 w120 h23 +0x200, Text
Gui Add, Text, x41 y64 w120 h23 +0x200, Text
Gui Add, Text, x41 y98 w120 h23 +0x200, Text
Gui Add, DropDownList, x169 y68 w120, DropDownList||
Gui Add, DropDownList, x169 y99 w120, DropDownList||
Gui Add, DropDownList, x169 y34 w120, DropDownList||
Gui Add, Button, x121 y136 w80 h23, &OK

Gui Show, w337 h194, Window
Return

GuiEscape:
GuiClose:
    ExitApp

User avatar
flyingDman
Posts: 2817
Joined: 29 Sep 2013, 19:01

Re: Gui > dropdown and starting a new column of controls  Topic is solved

Post by flyingDman » 27 Sep 2022, 13:47

Adding ym does work here:

Code: Select all

Gui, Add, DropDownList, ym vDropdown1, Hi|Hello|Yo|
14.3 & 1.3.7

Naitsirk
Posts: 40
Joined: 15 Feb 2022, 03:50

Re: Gui > dropdown and starting a new column of controls

Post by Naitsirk » 27 Sep 2022, 13:51

AHKStudent wrote:
27 Sep 2022, 13:41
Here is a link to autoGUI viewtopic.php?t=10157

Code: Select all

; Generated by AutoGUI 2.2.5a
#NoEnv
#SingleInstance Force
SetWorkingDir %A_ScriptDir%

Gui Add, Text, x41 y33 w120 h23 +0x200, Text
Gui Add, Text, x41 y64 w120 h23 +0x200, Text
Gui Add, Text, x41 y98 w120 h23 +0x200, Text
Gui Add, DropDownList, x169 y68 w120, DropDownList||
Gui Add, DropDownList, x169 y99 w120, DropDownList||
Gui Add, DropDownList, x169 y34 w120, DropDownList||
Gui Add, Button, x121 y136 w80 h23, &OK

Gui Show, w337 h194, Window
Return

GuiEscape:
GuiClose:
    ExitApp
Then why does this work without inputting x y w h?

Code: Select all

^1::
Sleep, 550
Gui, Destroy
Gui, Add, Text,, Input name
Gui, Add, Text,, Anvendt betalingsmetode:
Gui, Add, Text,, Phishing type:
Gui, Add, Text,, Kunde udsat for pres?
Gui, Add, Edit, vName ym  ; The ym option starts a new column of controls.
Gui, Add, DropDownList, vPm, 3D|Wallet|Blandet| 
Gui, Add, DropDownList, vType, Mail|sms|Opkald|Ukendt| 
Gui, Add, DropDownList, vPressure, Ja|Nej|Ukendt|
Gui, Add, Button, default, OK  ; The label ButtonOK (if it exists) will be run when the button is pressed.
Gui, Show,, 3D fraud
return  ; End of hotkey subroutine.

Naitsirk
Posts: 40
Joined: 15 Feb 2022, 03:50

Re: Gui > dropdown and starting a new column of controls

Post by Naitsirk » 27 Sep 2022, 13:55

flyingDman wrote:
27 Sep 2022, 13:47
Adding ym does work here:

Code: Select all

Gui, Add, DropDownList, ym vDropdown1, Hi|Hello|Yo|
Once again you are my savior. Its not the first time you've helped me. I thank you, sir!

Post Reply

Return to “Ask for Help (v1)”