Create button with arrow Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Loop
Posts: 169
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 378 times
Thx
User avatar
TheDewd
Posts: 1513
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
}
Loop
Posts: 169
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 (v1)”

Who is online

Users browsing this forum: filipemb, Google [Bot], mikeyww, NinjoOnline and 278 guests