spontaneously resizing fields

Wouter wouter.abraham at pi.be
Fri Jan 2 20:39:50 EST 2004


On 02 Jan 2004, at 23:20, use-revolution-request at lists.runrev.com wrote:

> Message: 4
> Date: Fri, 2 Jan 2004 12:48:38 -0700
> From: Alex Rice <alex at mindlube.com>
> Subject: Re: spontaneously resizing fields
> To: How to use Revolution <use-revolution at lists.runrev.com>
> Message-ID: <A879129A-3D5C-11D8-A569-000393C4760A at mindlube.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
>
> OK here is a recipe. Is this an IDE bug, or something I am doing wrong?

snip


> on commandKeyDown pKey
>    if pKey = "a" and the shiftKey = "down" then
>      put (not lFldLocked) into lFldLocked
>      updateUI
>      exit commandKeyDown
>    end if
>    pass commandKeyDown
> end commandKeyDown
>
> on updateUI
>    if lFldLocked <> true then
>      set the lockText of fld 1 to true
>      set the showFocusBorder of fld 1 to false
>    else
>      set the lockText of fld 1 to false
>      set the showFocusBorder of fld 1 to true
>      select text of fld 1
>    end if
>    if (lFldLocked <> true) and (fld 1 = empty) then
>      disable fld 1
>    else
>      enable fld 1
>    end if
> end updateUI
>
> Alex Rice <alex at mindlube.com> | Mindlube Software |
> <http://mindlube.com>
>
>

change the updateUI to :


on updateUI
   if lFldLocked <> true then
     if fld  1 is "" then disable fld 1
     else set the locktext of fld 1 to true
     set the showFocusBorder of fld 1 to false
   else
     if not the enabled of fld 1  then enable fld 1
     set the locktext of fld 1 to false
     set the showFocusBorder of fld 1 to true
     select text of fld 1
   end if
end updateUI

Greetings and a happy new year to all,

WA



More information about the use-livecode mailing list