Create button with arrow Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
Loop
Posts: 43
Joined: 07 Jan 2019, 14:51

Create button with arrow

10 Dec 2019, 16:46

Hello,
how can i create a button with arrow and when i click on the arrow, more buttons should appear.

Something like that:
button.jpg
button.jpg (3.74 KiB) Viewed 250 times
Thx
User avatar
TheDewd
Posts: 1391
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Create button with arrow  Topic is solved

10 Dec 2019, 16:56

Did you want a menu? See below:

Code: Select all

#SingleInstance, Force

Menu, ButtonMenu, Add, Option 1, MenuHandler
Menu, ButtonMenu, Add, Option 2, MenuHandler
Menu, ButtonMenu, Add, Option 3, MenuHandler
Menu, ButtonMenu, Add, Option 4, MenuHandler
Menu, ButtonMenu, Add, Option 5, MenuHandler
Menu, ButtonMenu, Add, Option 6, MenuHandler

Gui, Margin, 10, 10
Gui, Add, Button, w100 h26, Button
Gui, Add, Button, x+0 yp w20 h26 vDownArrow gShowMenu, % Chr(0x25BE) ; SMALL BLACK DOWN-POINTING TRIANGLE
Gui, Show, w400 h400, Example
return

ShowMenu:
	GuiControlGet, DownArrow, Pos
	Menu, ButtonMenu, Show, % DownArrowX, % DownArrowY + DownArrowH
return

MenuHandler(ItemName, ItemPos, MenuName) {
    MsgBox, 0x40, MenuHandler, % "Item Name: " ItemName "`n"
    . "Item Position: " ItemPos "`n"
    . "Menu Name: " MenuName
}
Image Bulldozer - Sokoban inspired game from 1994 recreated in AutoHotkey.
Loop
Posts: 43
Joined: 07 Jan 2019, 14:51

Re: Create button with arrow

10 Dec 2019, 17:29

Wow, Thanks, that was quick.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], boiler, burque505, TAC109, vsub, WeThotUWasAToad, yuyu and 139 guests