Popup menu on right instead of left? Topic is solved

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
sirksel
Posts: 222
Joined: 12 Nov 2013, 23:48

Popup menu on right instead of left?

08 Oct 2021, 08:44

Is there a way to force a nested popup menu to open on the right side of its parent, instead of the left?
sirksel
Posts: 222
Joined: 12 Nov 2013, 23:48

Re: Popup submenu on right instead of left?

10 Oct 2021, 02:47

PARTIAL ANSWER: I just discovered that some Windows Update somewhere set
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows to 1 instead of 0. Not sure why I started noticing it on my AHK apps, since when I looked harder at other apps, it appeared to be a system-wide behavior, not just AHK.

If anyone looking also has this problem, you can also run:
shell:::{80F3F1D5-FECA-45F3-BC32-752C152E456E}
and then on the "Other" tab, pick Left Handed on the Handedness settings.

It seems weird to have the arrow (indicating that a submenu will be opening) pointing to the right side of the submenu entry... and then have the menu pop out on the left! Maybe I'm the only one who would ever be bothered by that. :)

UNANSWERED PART: If there is an override I could include in my AHK code that someone knows about, that would be great as well. I use my scripts portable on many computers so there are cases where it wouldn't be appropriate for me to alter someone else's registry or handedness settings... Many thanks!
ludamo
Posts: 44
Joined: 25 Mar 2015, 02:21

Re: Popup menu on right instead of left?  Topic is solved

10 Oct 2021, 03:45

Have a look at SystemParametersInfo function and SPI_SETMENUDROPALIGNMENT. e.g.

Code: Select all

DllCall("SystemParametersInfo", "uint", 0x001C, "uint", 1, "int", 0, "uint", 0)
sirksel
Posts: 222
Joined: 12 Nov 2013, 23:48

Re: Popup menu on right instead of left?

15 Oct 2021, 14:21

@ludamo
Perfect. That worked regardless of the default setting, just as I'd wanted. Thank you!

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: demon740, Descolada, lexikos and 42 guests