Pop-Up the content of lines

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
francof
Posts: 237
Joined: Fri Apr 11, 2014 10:51 am

Pop-Up the content of lines

Post by francof » Mon Aug 25, 2014 9:33 am

Hi all,
I don't know if it's possible but I try to ask.

I've a scrolling field containing in each line a long string of text. the end part of strings are hidden, due to the width of the field (obviously I've used the H scrollbar to show all the text).
but would be possible to put in a label the content of a line, only the mouse is over it, without click on the line? (something like the Hover Icon of a button)

ciao
franco

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

Re: Pop-Up the content of lines

Post by jmburnod » Mon Aug 25, 2014 11:01 am

Ciao Franco,
You can use mouseline() to get the num of line which is under the cursor 8)

Code: Select all

on mousemove
   put  mouseline()
end mousemove
Best regards
Jean-Marc
https://alternatic.ch

francof
Posts: 237
Joined: Fri Apr 11, 2014 10:51 am

Re: Pop-Up the content of lines

Post by francof » Mon Aug 25, 2014 1:37 pm

bonjour Jean-Marc,

thanks for your help. I tried this code into the script of the field I want to monitor "fldDoc":

Code: Select all

on mousemove
   put text of the mouseLine into fld "fldTesto"
end mousemove
it works, but sometime, I don't know why and when I got this error:
field "fldDoc": execution error at line 36 (Chunk: no target found), char 13

the target is the field and the code should be runs only when the mouse is over it....

Best regards
franco

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Pop-Up the content of lines

Post by bangkok » Mon Aug 25, 2014 4:39 pm

francof wrote: it works, but sometime, I don't know why and when I got this error:
field "fldDoc": execution error at line 36 (Chunk: no target found), char 13

the target is the field and the code should be runs only when the mouse is over it....
franco
It's caused by the scrollbar. The mouseline returns empty...

To solve the problem :

Code: Select all

on mousemove
   put the mouseline  into tVAR
   if tVAR is not empty then put  text of the mouseline into fld "fldTesto"
end mousemove

francof
Posts: 237
Joined: Fri Apr 11, 2014 10:51 am

Re: Pop-Up the content of lines

Post by francof » Mon Aug 25, 2014 6:28 pm

HI bangkok,
so is the space taken by the scrollbars to drive me crazy... thanks for the tip.

ciao
franco

Post Reply