Code: Select all
menu, mymenu, add, loooooooooooooooooooooongitem, handler
menu, mymenu, show
menu, mymenu, rename, loooooooooooooooooooooongitem, shortitem
menu, mymenu, show
handler:
return
Code: Select all
menu, mymenu, add, loooooooooooooooooooooongitem, handler
menu, mymenu, show
menu, mymenu, rename, loooooooooooooooooooooongitem, shortitem
menu, mymenu, show
handler:
return
I don't think so, not with normal commands at least. You probably can do it with some dll calls or something but that's beyond my reach.think wrote:Would it be it possible to reset a menu width after renaming an item without re-creating a menu? As you see in the following example, after renaming the item, menu width doesn't get adapted to short name.
Code: Select all
menu, mymenu, add, loooooooooooooooooooooongitem, handler menu, mymenu, show menu, mymenu, rename, loooooooooooooooooooooongitem, shortitem menu, mymenu, show handler: return
Code: Select all
#Persistent
; menu class 32768
SetTimer, WatchCursor, 100
return
WatchCursor:
MouseGetPos, , , id, control
WinGetTitle, title, ahk_id %id%
WinGetClass, class, ahk_id %id%
ToolTip, ahk_id %id%`nahk_class %class%`n%title%`nControl: %control%
return
a::
menu, mymenu, add, loooooooooooooooooooooongitem, handler
menu, mymenu, show
menu, mymenu, rename, loooooooooooooooooooooongitem, shortitem
menu, mymenu, show
return
handler:
return
esc::exitapp
Users browsing this forum: Google [Bot], scriptor2016 and 308 guests