Text Entry field Cursor
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Text Entry field Cursor
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)
			
			
									
									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)
Is age an excuse? Eighty-four and counting.
Programming powered by coffee.
						Programming powered by coffee.
Re: Text Entry field Cursor
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.
			
			
									
									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
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?as the cursor can't be
positioned with the mouse.
Craig NEwman
Re: Text Entry field Cursor
Check the field properties. Locktext should be false, autohilite true, and traversalon true.
			
			
									
									Jacqueline Landman Gay         |     jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
						HyperActive Software | http://www.hyperactivesw.com
Re: Text Entry field Cursor
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:
Craig
			
			
									
									
						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.- 
				richmond62
- Livecode Opensource Backer 
- Posts: 10202
- Joined: Fri Feb 19, 2010 10:17 am
Re: Text Entry field Cursor
I don't see why this should be a problem . . .how to set the cursor in a body of text WITHOUT using the mouse
-
Code: Select all
on rawKeyDown RK
   if RK = 65470 then
      select after fld "ff"
   else
      pass rawKeyDown
      end if
end rawKeyDown
					Last edited by richmond62 on Sat Jun 16, 2018 6:45 pm, edited 1 time in total.
									
			
									
						- 
				richmond62
- Livecode Opensource Backer 
- Posts: 10202
- Joined: Fri Feb 19, 2010 10:17 am
Re: Text Entry field Cursor
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
			
			
													windowless, app-less operating system:
https://en.wikipedia.org/wiki/Jef_Raskin
					Last edited by richmond62 on Sat Jun 16, 2018 7:44 pm, edited 1 time in total.
									
			
									
						Re: Text Entry field Cursor
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.
			
			
									
									Another reason for the failure could be a transparent button or field on top of the editable one.
Jacqueline Landman Gay         |     jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
						HyperActive Software | http://www.hyperactivesw.com
- 
				richmond62
- Livecode Opensource Backer 
- Posts: 10202
- Joined: Fri Feb 19, 2010 10:17 am
Re: Text Entry field Cursor
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
- 
				richmond62
- Livecode Opensource Backer 
- Posts: 10202
- Joined: Fri Feb 19, 2010 10:17 am
- 
				richmond62
- Livecode Opensource Backer 
- Posts: 10202
- Joined: Fri Feb 19, 2010 10:17 am
- 
				richmond62
- Livecode Opensource Backer 
- Posts: 10202
- Joined: Fri Feb 19, 2010 10:17 am
- 
				richmond62
- Livecode Opensource Backer 
- Posts: 10202
- Joined: Fri Feb 19, 2010 10:17 am
Re: Text Entry field Cursor
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."
- -
Good fun while it lasted.
			
			
									
									
						MacOS 10.7.5 system it "doesn't play ball."
- -
Good fun while it lasted.

- 
				richmond62
- Livecode Opensource Backer 
- Posts: 10202
- Joined: Fri Feb 19, 2010 10:17 am
Re: Text Entry field Cursor
I can't help thinking that our current dependence on mice, 
trackpads and trackballs cramps our thinking in some ways.
-
			
			
									
									
						trackpads and trackballs cramps our thinking in some ways.
-
- 
				FourthWorld
- VIP Livecode Opensource Backer 
- Posts: 10065
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Text Entry field Cursor
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.
			
			
									
									If not, save that stack and post it here.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
						LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn