right-click option
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
right-click option
Hi to All,
Could someone tell me how you include right-clicking in a program?
Thanks,
Patrick
Could someone tell me how you include right-clicking in a program?
Thanks,
Patrick
Re: right-click option
The mouseClick function does not discriminate. Perhaps try to use the "click" command? Check the dictionary and try a few experiments.
Craig Newman
Craig Newman
Re: right-click option
Hi Patrick,
you need:
1. prepare a POPUP menu button
2. Add a "mosuedown" script to the objects where you want to popup the contextmenu:
That's the mechanism, basically 
Best
Klaus
you need:
1. prepare a POPUP menu button
2. Add a "mosuedown" script to the objects where you want to popup the contextmenu:
Code: Select all
on mousedown tMouseButton
if tMouseButton = 3 then ## right click!
popup btn "you prepared button here" at the mouseloc
else
## optional...
end if
end mousedown

Best
Klaus
Re: right-click option
Hi Klaus,
Thanks. I got the general idea, but I'm not sure how to word what I want. Is there anything written already that would work on the text in a field (copy, delete, etc) like a typical windows right click?
Thanks,
Patrick
Thanks. I got the general idea, but I'm not sure how to word what I want. Is there anything written already that would work on the text in a field (copy, delete, etc) like a typical windows right click?
Thanks,
Patrick
Re: right-click option
I see what you mean now. Maybe start more simply...
Make a button. Put this in its script:
Craig Newman
Make a button. Put this in its script:
Code: Select all
on mouseUp tButtonNumber
if tButtonNumber = 1 then answer "You used the left button"
else answer "You used the right button"
-- or more elegantly:
answer "You must have used button" && tButtonNumber
end mouseUp
-
- VIP Livecode Opensource Backer
- Posts: 931
- Joined: Thu Nov 13, 2008 6:48 am
Re: right-click option
Hi Patrick, I'll post a complete working example this weekend (I've been working on one that lets you add, edit, delete items from a list in a scrolling list field and then drag/drop to re-arrange the list). However, there is one problem. Currently, because of a bug (#7766) on the PC version it will only work on the Mac. That being said, the only impact of the bug is that after a "popup" function the drag/drop won't work until you move the mouse out of the field and then back in again (this has to do with the fact that LC stops sending mousemove messages to the field after a pop-up). So, in short what I am trying to say is most of the functionality you want will be in the program, you'll probably just have to remove or disable the drag/drop stuff until RR can fix the bug. Look for a repost of the Enhanced Scrolling List field later this weekend.herbwords wrote:Hi Klaus,
Thanks. I got the general idea, but I'm not sure how to word what I want. Is there anything written already that would work on the text in a field (copy, delete, etc) like a typical windows right click?
Thanks,
Patrick
-- Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS
Targets: Mac, iOS
Re: right-click option
I've contacted a developer to see what it will cost to get it written. If anyone here wants to take a crack at it give me a price.
send to: herbwords@yahoo.com
Thanks All
send to: herbwords@yahoo.com
Thanks All