How to implement an arrow down button?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
afe
Posts: 615
Joined: 06 Dec 2018, 04:36

How to implement an arrow down button?

14 Jan 2019, 03:00

Hello,

I want to make a button that will display a list when I click the button. Just like the button behind the Windows Explorer forward button.
Which control should I use?

Thank you.

Code: Select all

Gui, Margin, 0, 0
Gui, Add, Button, w80 section vBack, Back
Gui, Add, Button, ys w17 section vDown, ▾
Gui, Add, Button, w80 ys section vForward, Forward
Gui, Add, ComboBox, ys+1 r15 w160 v ComboBox
Gui, Show
return
User avatar
TheDewd
Posts: 1513
Joined: 19 Dec 2013, 11:16
Location: USA

Re: How to implement an arrow down button?

14 Jan 2019, 08:56

Code: Select all

#SingleInstance, Force

Menu, FileMenu, Add, &Open`tCtrl+O, MenuHandler
Menu, FileMenu, Add, E&xit, MenuHandler
Menu, HelpMenu, Add, &About, MenuHandler
Menu, MyMenu, Add, &File, :FileMenu
Menu, MyMenu, Add, &Help, :HelpMenu

Gui, Margin, 0, 0
Gui, Add, Button, w80 h23 vBack, Back
Gui, Add, Button, x+0 yp w17 h23 vDown gShowMenu, % Chr(0x25BE) ; SMALL BLACK DOWN-POINTING TRIANGLE
Gui, Add, Button, x+0 yp w80 h23 vForward, Forward
Gui, Add, ComboBox, x+0 yp hp r15 w160 vComboBox
Gui, Show, AutoSize, Example
return

ShowMenu:
	GuiControlGet, Down, Pos
	Menu, MyMenu, Show, % DownX, % DownY + DownH
return

MenuHandler(ItemName, ItemPos, MenuName) {
    MsgBox, 0x40, MenuHandler, % "Item Name: " ItemName "`n"
    . "Item Position: " ItemPos "`n"
    . "Menu Name: " MenuName
}
afe
Posts: 615
Joined: 06 Dec 2018, 04:36

Re: How to implement an arrow down button?

14 Jan 2019, 09:39

Thank you. I also thought about whether it should be a list box or a menu. But I want it to display "history" instead of "menu".

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: BielGuitarJP, CrowexBR, mebelantikjaya, Spawnova and 321 guests