Page 1 of 1
How to get the value of mouseclick over image in field
Posted: Tue Nov 03, 2015 1:28 pm
by samjith
Hi,
I want to know the mouseclicked is over the image (close icon) or not?, is there any command for this?
I am attaching the stack. My wish is to, when i click over the image in field then the line will delete.
Please find the attached zip, so you can easly understand, what i really want to do
Thanks
Samjith
Re: How to get the value of mouseclick over image in field
Posted: Tue Nov 03, 2015 1:47 pm
by Klaus
Hi samjith,
hmmm, it IS a bit difficult to do this (...when i CLICK over the image in field then the line will delete..."
in a field that has this script:
Code: Select all
on mousedown
...
hide me
...
end mousedown
Remember "click" means MOUSEUP"
So this is actually IMPOSSIBLE!
And your "turbulent" design makes me nervous actually
But basically you want this:
User clicks the little icon in a line to delete that line, correct?
Then you should check if the character under the mouse has an "imagesource" property or not.
Add something like this:
Code: Select all
...
## We clicked an icon in the text
if the imagesource of the clickcharchunk <> EMPTY then
delete ...
end if
...
Best
Klaus
Re: How to get the value of mouseclick over image in field
Posted: Tue Nov 03, 2015 1:59 pm
by samjith
Hi Klaus,
Ya worked fine,
Actually, I am stucked from morning at this point, really great.
How you know all these things?
Did you ate anything special to increase your mental strength?
Thanks
Samjith
Re: How to get the value of mouseclick over image in field
Posted: Tue Nov 03, 2015 2:23 pm
by Klaus
Namaste samjith,
samjith wrote:How you know all these things?
I am working with LC and its ancestors Runtime Revolution and Metacard since 1999
and I have a very very good memory.
samjith wrote:Did you ate anything special to increase your mental strength?

No, I was just born clever!
Best
Klaus
Re: How to get the value of mouseclick over image in field
Posted: Wed Nov 04, 2015 6:12 am
by samjith
Hi,
hmmm. At that time, i was only age 9
Thanks
Samjith
Re: How to get the value of mouseclick over image in field
Posted: Wed Nov 04, 2015 2:19 pm
by Klaus
Even dwarfs started small!

Re: How to get the value of mouseclick over image in field
Posted: Wed Nov 04, 2015 4:02 pm
by richmond62
Re: How to get the value of mouseclick over image in field
Posted: Wed Nov 04, 2015 5:34 pm
by richmond62
Here's something to play with:
Re: How to get the value of mouseclick over image in field
Posted: Wed Nov 04, 2015 5:51 pm
by Klaus
Nice, Richmond, very nice, but we already solved his problem yesterday!

Re: How to get the value of mouseclick over image in field
Posted: Wed Nov 04, 2015 7:48 pm
by richmond62
Yer: yesterday was my day off.
Re: How to get the value of mouseclick over image in field
Posted: Wed Nov 04, 2015 7:56 pm
by Klaus
richmond62 wrote:Yer: yesterday was my day off.
OK, but it has been documented right here also!

Re: How to get the value of mouseclick over image in field
Posted: Fri Nov 06, 2015 7:17 am
by samjith
Hi,
Thank you both of you, sucessfully completed the task, but have problem.
Please have a look
http://forums.livecode.com/viewtopic.php?f=7&t=25796
Thanks
Samjith