position fr a click in an editable field

Jan Schenkel janschenkel at yahoo.com
Fri Oct 1 05:25:29 EDT 2004


--- thierry <douez at wanadoo.fr> wrote:
> Hi all,
> 
> Is there a trick to be able to find the current
> position in a line within a
> text in an editable field when we click on a space ?
> 
> i've tried all the **click() functions and
> properties, but could not
> get the information.
> 
> i've wrote a little handler which calculated the
> position ( column number )
> by using clickH() and a quick ratio with the size of
> the police... it works
> but only for non-proportionnal fonts.
> 
> Any help would be very much appreciated...
> 
> Regards, thierry
> 

Hi Thierry,

Perhaps you can do something with the 'selectedChunk'?
If no text is selected, and the cursor is between
chars 6 and 7, then the selectedChunk will be "char 7
to 6 of field x"

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 


More information about the use-livecode mailing list