get the clicked oval

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

get the clicked oval

Post by jmburnod » Fri Oct 25, 2013 12:28 pm

Hi All,

How to get the id of the clicked oval control in this context ?

• All oval have a different angles and can have the same rect or intersect
A "mousecolor" way works if each oval controls has its own color.

Is there a way to get it with oval with the same color ?

All the best

Jean-Marc
Attachments
getClickedOval.livecode.zip
(1.79 KiB) Downloaded 123 times
https://alternatic.ch

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: get the clicked oval

Post by Klaus » Fri Oct 25, 2013 12:41 pm

Hi Jean-Marc,

sorry, don't get it!?
Can't you just check THE TARGET on mousedown?


Best

Klaus

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: get the clicked oval

Post by jmburnod » Fri Oct 25, 2013 1:45 pm

Hi Klaus,

Sorry, my english explanation is not clear

The target returns the name of the clicked oval
In this case it is possible that the layer of the only colored part of the oval is back and that is this oval I want catch
I use mousecolor to find the first oval with a backgroundcolor = the mousecolor.

Best
Jean-Marc
https://alternatic.ch

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: get the clicked oval (colored part)

Post by jmburnod » Mon Oct 28, 2013 8:57 pm

Hi All,

My first explanation was bad. I hope this one is better.
How to get the id of the oval which has the colored part in this context ?
I use a color way and its work fine if each part of pie has its own color and not if there are two parts of pie with the same color.
I am sure there is a way to get it if two or more chart of pie have the same color.

What about a way like a function "pointToAngle" to know if the mouseloc is in the colored part of a graphic ?

Thank gain for your help

Jean-Marc
Attachments
ownercoloredpart.livecode.zip
(1.96 KiB) Downloaded 124 times
https://alternatic.ch

Post Reply