How to enable and disable a group of buttons with text input in a field?

Jan Schenkel janschenkel at yahoo.com
Wed Apr 12 16:13:49 EDT 2006


--- William de Smet <wdesmet at wanadoo.nl> wrote:
> Hi there,
> 
> I have a field that I want to use to enable and
> disable a group of buttons:
> - When the user puts text into the field the group
> will be enabled.
> - When the user deletes the text (the field is
> empty) the group will be disabled
> 
> So far the first part works but I can't get the
> second part to work:
> 
> on Keydown
>   enable group "test"
>   pass keydown
> end Keydown
> 
> Any suggestions?
> 
> Greetings,
> 
> William de Smet
> 

Hi William,

Initial thought: use the 'selectionChanged' mesage -
whenever you type something or remove text using
backspace or the delete key, this should be sent.
So try this:
##
on selectionChanged
  set the enabled of group "test" to (the text of me
is empty)
end selectionChanged
##

Hope this helped,

Jan Schenkel.

Quartam Reports for Revolution
<http://www.quartam.com>

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

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the use-livecode mailing list