problems with popups
Terry Judd
tsj at unimelb.edu.au
Tue Aug 9 06:16:52 EDT 2005
I wrote...
> under Windows. I'm using a 'rectangle' type button to popup the
'popup'
> type button (popup btn "historyMenu" at the bottomLeft of me) and the
> following happens (auto hilite of 'rectangle' button is true) on
> mouseDown
>
> 1. 'rectangle' button hilites
> 2. popup menu displays, and continues to display while the mouse is
> down but a mouseUp message is sent to the 'rectangle' button as soon
as
> the popup displays
>
> and on mouseUp...
>
> 3. the 'rectangle' button's hilite stays on or off depending on its
> initial state when it was clicked
>
> I've been able to fix the hiliting problem by checking the state of
the
> mouse in a mouseUp handler and sending messages to it until it is up
> and then setting the hilite correctly. However, to get the popup menu
> to 'stick' open I have to put a "wait until the mouse is up with
> messages" line in the mouseDown handler - before popping up the menu -
> but then (of course) it doesn't appear while the mouse is down. This
> stuff seems to behave correctly under OSX.
>
> Has anyone experienced these problems and if so can they suggest any
> solutions/workarounds.
Then Ken wrote...
Yes, I encountered the same thing and bugged it in Bugzilla (#423). You
need
to add this in your handler:
if the platform is "Win32" then
wait until the mouse is up with messages
end if
---------------------------------------
Thanks Ken - I'd already found and tried your 'wait' workaround in
Bugzilla, which gives me a 'sticky' menu but as I mentioned above
doesn't actually popup the menu until you release the mouse button.
Coming from the Mac side of things I'm more used to selecting items
from a menu with the mouse down (even though Mac has supported 'sticky'
menus for quite some time) but what's the deal on the Window's side of
things? Are user more likely to expect the mouseDown style popup or the
mouseUp style popup, given that they can only have one or the other (I
actually managed to hack a workaround that used a timer and repopped
the menu under a mouseUp handler but the resultant double menu flash
was too ugly to live with).
Cheers,
Terry...
More information about the use-livecode
mailing list