AW: which field property to set for 'scrolling'?

Eric Chatonet eric.chatonet at sosmartsoftware.com
Mon Aug 20 09:35:42 EDT 2007


Hello Tiemo,

I'm very sorry because I modified the code in my email client and of  
course made an error:
You should read:

on keyDown
   if the selectedField <> empty then
     if AllowInput() then --
       pass keyDown --
     end if
   else pass keyDown
end keyDown

Not that this process will not prevent the user to paste any long  
string ;-)

Le 20 août 07 à 15:27, Tiemo Hollmann TB a écrit :

> Hello Eric,
> I am quite not sure if I expressed myself correct and what your  
> handler
> should do. I put the handlers into my card, with no result. But In  
> your
> if-else condition there is twice "pass keyDown" - should that be?
>
> My single line field is a input field for a full path, which  
> naturally can
> be pretty long - longer as the field is. What I would like to have  
> is, that
> the text string in my field moves to the right, when I push the  
> arrow key to
> the left (and vice versa) to see the complete string.
>
> Sorry for my cumbersomely explanation :)
> Tiemo
>
>
>
>>
>> Hi Tiemo,
>>
>> You should be able to put these handlers in the card (stack) script:
>>
>> on keyDown
>>    if the selectedField <> empty then
>>      if  AllowInput() then pass keyDown --
>>    else pass keyDown
>> end keyDown
>> -----------------------------------------------
>> function AllowInput
>>    return the formattedWidth of the target < the width of the target
>> end AllowInput
>>
>> Keydown handler (when a key id pressed) will check, when it's a non
>> locked field and using the AllowInput function, the width of the
>> current string related to the physical width of the field. In other
>> cases, keydown will be passed.




More information about the use-livecode mailing list