Tabs

Alex Tweedly alex at tweedly.net
Sun Jan 2 19:09:08 EST 2005


James Cass wrote:

> As an alternative to using "if-then", I like to use a case statement 
> like the following, assuming everything for each tab is in its own group:
>
> on menuPick tabSelected
>   switch (tabSelected)
>   case "Tab 1"
>     show group "Tab 1"
>     hide group "Tab 2"
>     hide group "Tab 3"
>     break
>   case "Tab 2"
>     hide group "Tab 1"
>     show group "Tab 2"
>     hide group "Tab 3"
>     break
>   case "Tab 3"
>     hide group "Tab 1"
>     hide group "Tab 2"
>     show group "Tab 3"
>     break
>   end switch
> end menuPick
>
Is it terribly lazy of me to think .....

on menuPick tabSelected
  hide group "Tab 1"
  hide group "Tab 2"
  hide group "Tab 3"
  show group tabSelected
end menuPick

-- Alex.


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.298 / Virus Database: 265.6.7 - Release Date: 30/12/2004



More information about the use-livecode mailing list