Get active line in field
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Get active line in field
Hi there,
I cant seem to find the way to get the active line (currently flashing text cursor), in a text field..?
I am needing something resembling :
on textChange
put the activeLine of field "textField" into tCurrentWorkingLine
end textChange
I cant seem to find the way to get the active line (currently flashing text cursor), in a text field..?
I am needing something resembling :
on textChange
put the activeLine of field "textField" into tCurrentWorkingLine
end textChange
Kind Regards
Gary
https://www.doobox.co.uk
Gary
https://www.doobox.co.uk
Re: Get active line in field
Ahhh.. got it..
Code: Select all
on mouseUp
put "test" after the selection
put the lineIndex of the selection into tCapturedLine
put line tCapturedLine of field "test" into field "capturedLine"
end mouseUp
Kind Regards
Gary
https://www.doobox.co.uk
Gary
https://www.doobox.co.uk
Re: Get active line in field
Hi Gary,
... the lineindex of the selection...????
Where did you find this?
Best
Klaus
... the lineindex of the selection...????

Where did you find this?
Best
Klaus
Re: Get active line in field
Klaus...
He got it from the dictionary...
be well
Dixie
He got it from the dictionary...

be well
Dixie
Re: Get active line in field
Oh, this is LC 5.5, right?
OK, in that case I will not find it in MY dictionary yet
OK, in that case I will not find it in MY dictionary yet

Re: Get active line in field
I did not find it in the dictionary.. Just guess work. Does the job though 

Kind Regards
Gary
https://www.doobox.co.uk
Gary
https://www.doobox.co.uk
Re: Get active line in field
Hi Gary,
well, it IS not in the dictionary, that's what's puzzling me
So are you using LC 5.5?
Best
Klaus
well, it IS not in the dictionary, that's what's puzzling me

So are you using LC 5.5?
Best
Klaus
Re: Get active line in field
Here is the concise way i ended up using it :
Year 5.5 but i don't see it in dictionary here either.
Code: Select all
on textChanged
put the lineIndex of the selection into tCapturedLine
put line tCapturedLine of me into field "currentLine"
end textChanged
Kind Regards
Gary
https://www.doobox.co.uk
Gary
https://www.doobox.co.uk
Re: Get active line in field
I tell a lie... lineIndex is there :
Examples:
-- Example: 2 lines of text in a field
-- Hello World
-- Goodbye World
the lineIndex of char 7 of field 1 -- 1
-- char 7 is on line 1
the lineIndex of word 4 of field 1 -- 2
-- word 4 is on line 2
Examples:
-- Example: 2 lines of text in a field
-- Hello World
-- Goodbye World
the lineIndex of char 7 of field 1 -- 1
-- char 7 is on line 1
the lineIndex of word 4 of field 1 -- 2
-- word 4 is on line 2
Kind Regards
Gary
https://www.doobox.co.uk
Gary
https://www.doobox.co.uk
Re: Get active line in field
Ok wow. I obviously need to go through the new dictionary!
Re: Get active line in field
Looks like I need to get some bucks and buy the update 

Re: Get active line in field
The first thing I always do after a release is read the release notes, which are in the Help menu. At the bottom of the notes is a summary of all the new features. Then I know what to look up in both the release notes and the dictionary.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com