Focus and Text Fields

André.Bisseret Andre.Bisseret at inria.fr
Sun Oct 8 09:36:56 EDT 2006


Hello Richmond,
My answer was not delivered (due to the incident on this list, I  
suppose) so I send it again

Le 6 oct. 06 à 09:45, Richmond Mathewson a écrit :

> I have the following script in a Card:
>
> on openCard
>   put "We" into fld "F1"
>   focus on fld "F1"
> end openCard
>
> now what this does is:
>
> it puts "We" into the field "F1"
>
> and then
>
> puts the cursor BEFORE "We" in the field "F1"
>
> (nothing terribly remarkable there!)
>
> HOWEVER,
>
> I would like it so that when the FOCUS is set to field
> "F1" the
> cursor is set after the letters "We"

Hello,

What about "select after fld "F1" ?

on openCard
put "We" into fld "F1"
-- focus on fld "F1"  -- redondant in fact because "select after fld  
"F1" is focusing on fld "F1"
select after fld "F1"
end openCard

>
> AND - - -
>
> directions for how to put a cursor anywhere in a
> string inside a field:
>
> e.g. Between "I" and "a drink"
>
> in "I a drink"

   get offset("I", fld "F1")
   select after char it of fld "F1"
or
find "I" in fld "F1"
select after the foundText
find empty

hope that helps

Best regards from Grenoble
André

>
> ------
>
> Of course this question has a general application.
>
> I would be very grateful for any help.
>
> sincerely, Richmond Mathewson
>
> ____________________________________________________________
>
> "Philosophical problems are confusions arising owing to the  
> fluidity of meanings users attach to words and phrases."
>                                        Mathewson, 2006
> ____________________________________________________________
>
>
> 	
> 	
> 		
> ___________________________________________________________
> All new Yahoo! Mail "The new Interface is stunning in its  
> simplicity and ease of use." - PC Magazine
> http://uk.docs.yahoo.com/nowyoucan.html
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the Use-livecode mailing list