How to set cursor location
Posted: Mon Jun 22, 2015 12:42 pm
How to set the position of cursor in scrolling text field. I know the line number (say, line 15 of field 1), then how to set the position of cursor.
Questions and answers about the LiveCode platform.
https://www.forums.livecode.com/
sorry, I'm afraid I don't understand what your problem is?samjith wrote: I need certain replaces, if i select "replace_All" from my popup menu. The text in my screen moves automatically.
I want the changes, but i dont need to changes the text in the screen.
Code: Select all
case Revert_Once
put gmouse_line into RevertLine
if backgroundColor of button "UK" is red then
put the htmlText of RevertLine into myR
replace "<strike><font bgcolor=" & quote & "#FFFF00" & quote & ">" & gUS & "</font></strike><font bgcolor=" & quote & "#00FF00" & quote & ">" & gUK & "</font>" with "<font bgcolor=" & quote & "#00FF00" & quote & ">" & gUS & "</font>" in myR
set the htmlText of RevertLine to myR
put myR into gmouse_line
end if
if backgroundColor of button "US" is red then
put the htmlText of RevertLine into myR
replace "<strike><font bgcolor=" & quote & "#FFFF00" & quote & ">" & gUK & "</font></strike><font bgcolor=" & quote & "#00FF00" & quote & ">" & gUS & "</font>" with "<font bgcolor=" & quote & "#00FF00" & quote & ">" & gUK & "</font>" in myR
set the htmlText of RevertLine to myR
put myR into gmouse_line
end if
select before LineFinder
--unlock screen
--lock cursor
break