Smart way to determine poupmenu gets out of screen?
Smart way to determine poupmenu gets out of screen?
Is there a smart way to determine that popupmenu() is too long and some items are out of screen? Smth like a trigger determining that popupmenu is long enough to show those top/bottom arrow, or at least a screen-height variable.
Win 7 SP1 x64 100% 1366x768|1900x1080
Re: Smart way to determine poupmenu gets out of screen?
Yeah, that's the only variant i imagined: count how many items are visible, add counter check in menu forming code, put "extra" in nested menu. But that works only if menu position is the same. If menu is formed in various/mouse position, or if screen resolution(monitor) changed, such counter will "miss-calculate".
Win 7 SP1 x64 100% 1366x768|1900x1080
Re: Smart way to determine poupmenu gets out of screen?
Either create smaller hierarchies via popupnested() or use inputselect() (no, not a menu but no problems to display as many items as you want) instead...
One of my scripts helped you out? Please donate via Paypal
Re: Smart way to determine poupmenu gets out of screen?
Thank you for the hint about inputselect(), didn't consider that initially. But in my case it can't do, as only popupmenu() works with b64icons, and that's the main point why i started using dynamic long menus in my workflow.
I was actually hoping that maybe some <get ..> variation could determine popupmenu's state(that those top/bottom arrows for scrolling menu got activated), but guess will try to work smth with <get "screen"> and cursor position.
I'd wish popupmenu could be simply scrollable with mouse.
I was actually hoping that maybe some <get ..> variation could determine popupmenu's state(that those top/bottom arrows for scrolling menu got activated), but guess will try to work smth with <get "screen"> and cursor position.
I'd wish popupmenu could be simply scrollable with mouse.
Win 7 SP1 x64 100% 1366x768|1900x1080