how to get the textfont of the clickchunk in an unlocked field ?

Eric Chatonet eric.chatonet at sosmartsoftware.com
Wed Aug 31 11:47:05 EDT 2005


Hi Christian,

When a field is not locked, the mouseDown message is only sent when  
you click with button 3 but the engine always keeps the value of the  
clickchunk . So, as the only messages that are always sent to a not  
locked field are mouseDoubleDown and mouseMove, you could try a  
combination like the following:

on mousemove
   local tFont
   -----
   try -- since the clickChunk may be empty :-)
     put the effective textfont of the clickChunk into tFont
   end try
   put tFont -- into fld "UsedFont"
end mousemove

Hope this helps.

Best Regards from Paris,

Eric Chatonet.

Le 31 août 05 à 16:52, Langers Christian a écrit :

> Well I wanted to be able to get the font name to be displayed when  
> the user clicks (with MouseButtonNumber 1 !!!)  a word/textchunk in  
> a textfield...
>
> I tried this handler in the textfield :
>
> on mouseUp
>     put the effective textfont of the clickChunk
> end mouseUp
>
> but mouseUp/down meassages are not sent to the textfield....
>
>
> How to do it then  ?
>
> Thanks for any ideas,
>
> Christian

----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        eric.chatonet at sosmartsoftware.com/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------




More information about the use-livecode mailing list