popUp a button with itself on modified mouseDown?
Paul Hibbert
paulhibbert at mac.com
Mon Jun 30 14:49:46 EDT 2014
If your script is in a PopUp Menu button then it's probably just getting confused trying to pop up itself!
Maybe try something like this in a PopUp Menu ensuring that the "menuMouseButton" prop is set to "1"…
local sModKey
on mouseDown
--ShiftKey check
if the shiftKey is down then
put "Shift Key and" into sModKey
else
put "Just" into sModKey
end if
end mouseDown
on mouseUp pBtn
if pBtn = 3 then answer sModKey && the short name of me
end mouseUp
on menuPick pItemName
answer sModKey && pItemName
end menuPick
HTH
Paul
On 2014-06-30, at 8:48 AM, Dr. Hawkins <dochawk at gmail.com> wrote:
> I'm trying to get a button to normally be a boring old popup, but allow
> other things to be chosen by it.
>
> The "natural" way would seem to to change it on mousenter if the specified
> modifier key is down, or if the second button is clicked.
>
> I get the change to happen trivially, but if I'm doing it from a mouseDown,
> I can't get it to display itself. I'm trying things like,
>
> on mouseDown bt
> if bt=3 then
> popup button the short name of the target
> end if
> pass mouseDown
> end mouseDown
>
> But I'm not finding a magic combnation
> --
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list