Page 1 of 1

Text Entry field Cursor

Posted: Sat Jun 16, 2018 3:36 am
by RossG
I have a text entry field for the user to add/modify data.
It works but is inconvenient as the cursor can't be
positioned with the mouse. Tried "set cursor to arrow"
without success.

London to a brick there's an solution and someone
here knows what it is. (LC 7.1.2, Win XP)

Re: Text Entry field Cursor

Posted: Sat Jun 16, 2018 1:58 pm
by bogs
Heya Ross.

There must be more to the story, I set up a plain text field, pasted your question into it, and then clicked in / out of the field. Whenever I clicked in the field, the cursor was placed at the mouse location, so that does seem to be the default behavior.

Re: Text Entry field Cursor

Posted: Sat Jun 16, 2018 4:10 pm
by dunbarx
as the cursor can't be
positioned with the mouse.
I am puzzled as well. LC is "ordinary" in the way it treats editable fields. Others have asked how to set the cursor in a body of text WITHOUT using the mouse. Is it possible this is what you meant?

Craig NEwman

Re: Text Entry field Cursor

Posted: Sat Jun 16, 2018 5:05 pm
by jacque
Check the field properties. Locktext should be false, autohilite true, and traversalon true.

Re: Text Entry field Cursor

Posted: Sat Jun 16, 2018 5:37 pm
by dunbarx
Ah.

Jacque may have identified the issue.

is it that you want the user to be able to click on a word or line, and then have LC extract the pertinent data for further processing?

Something like:

Code: Select all

on mouseUp
answer the clickText
...etc.
Craig

Re: Text Entry field Cursor

Posted: Sat Jun 16, 2018 6:08 pm
by richmond62
how to set the cursor in a body of text WITHOUT using the mouse
I don't see why this should be a problem . . .
-

Code: Select all

on rawKeyDown RK
   if RK = 65470 then
      select after fld "ff"
   else
      pass rawKeyDown
      end if
end rawKeyDown
-
Texty.png

Re: Text Entry field Cursor

Posted: Sat Jun 16, 2018 6:12 pm
by richmond62
In fact, come to think of things, Jef Raskin tried to design a mouseless,
windowless, app-less operating system:

https://en.wikipedia.org/wiki/Jef_Raskin

Re: Text Entry field Cursor

Posted: Sat Jun 16, 2018 6:17 pm
by jacque
You guys may be overthinking this. It sounds like he just wants a normal editable text field.

Another reason for the failure could be a transparent button or field on top of the editable one.

Re: Text Entry field Cursor

Posted: Sat Jun 16, 2018 6:44 pm
by richmond62

Code: Select all

on rawKeyDown RK
   switch RK
   case 65470
      select after fld "ff"
      break
   case 65471
      select after trueWord 1 of fld "ff"
      break
   case 65472
      --
   case 65474
      select the last trueWord of fld "ff"
      copy
      select after fld "gg"
      paste
      break
      default
      pass rawKeyDown
      end switch
end rawKeyDown
-
TextyTwo.png

Re: Text Entry field Cursor

Posted: Sat Jun 16, 2018 7:21 pm
by richmond62
TextyThree.png

Re: Text Entry field Cursor

Posted: Sat Jun 16, 2018 7:42 pm
by richmond62
TextyFour.png

Re: Text Entry field Cursor

Posted: Sat Jun 16, 2018 8:09 pm
by richmond62
TextyFive.png
-
Text Selector.livecode.zip
(65.19 KiB) Downloaded 168 times

Re: Text Entry field Cursor

Posted: Sat Jun 16, 2018 8:11 pm
by richmond62
Oddly enough that's probably where I have to control myself as, when I press the "F9" key on my
MacOS 10.7.5 system it "doesn't play ball."
-
lineWalk.jpg
-
Good fun while it lasted. 8)

Re: Text Entry field Cursor

Posted: Sat Jun 16, 2018 8:18 pm
by richmond62
I can't help thinking that our current dependence on mice,
trackpads and trackballs cramps our thinking in some ways.
-
mishka.jpg
mishka.jpg (4.2 KiB) Viewed 7350 times

Re: Text Entry field Cursor

Posted: Sat Jun 16, 2018 11:33 pm
by FourthWorld
Ross, can you create a new stack, drag a field to it, and then after switching to the Browse tool edit the field contents?

If not, save that stack and post it here.