group-al cmds like "set the highlitedButtonName to 0" for propserties?

Jan Schenkel janschenkel at yahoo.com
Mon Feb 7 15:16:53 EST 2005


--- Erik Hansen <erikhans08 at yahoo.com> wrote:
> 
> for colorblind users, a selected control has:
> the width = the width +8
> the borderWidth = 2
> 
> some groups have multiple hilites so
> before selecting a new control in the group:
> 
> on standDown pGroup,pWidth
>   set the highlitedButtonName of grp pGroup to 0
>   -- 1 line of code
>   put (the number of controls in grp pGroup)\
>   into tot
> 
>   repeat with i = 1 t tot
>    set the width of control i to pWidth
>    set the borderWidth of control i to 1
>   end repeat
>   -- many lines of code & repeats
> end standDown
> 
> is there a single-line-command
> that resets the individual
> control properties of all
> grouped controls to the default value
> specified for that group?
> 
> [snip]
> 
> thanks,
> 
> Erik Hansen
> 

I'm afraid not, Erik -- your repeat loop is the way to
do it. I'm not sure what language construct could be
added to Transcript to accomodate for this in an
elegant way ; perhaps something like :
--
  repeat for each control tControl in group "Foobar"
    set the whateverProp of tControl to 0
  end repeat
--

But that's the closest math I could find.

Jan Schenkel.

=====
Quartam - Tools 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!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 



More information about the use-livecode mailing list