Tabs

James Cass cassj at earthlink.net
Sun Jan 2 18:37:06 EST 2005


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

That's my two kopeks.
- James


On Jan 2, 2005, at 6:04 PM, David Kwinter wrote:

> You could also use the menuPick handler
>
> on menuPick m
>    if m="Tab1" then
>        hide group "tab2"
>        show group "tab1"
>    else if m="Tab2" then
>        hide group "tab1"
>        show group "tab2"
>    end if
> end menuPick
>
>
> ----- Original Message ----- From: "Judy Perry" 
> <jperryl at ecs.fullerton.edu>
> To: "docmann" <docmann at gmail.com>; "How to use Revolution" 
> <use-revolution at lists.runrev.com>
> Sent: Sunday, January 02, 2005 1:01 PM
> Subject: Re: Tabs
>
>>
>> on mouseUp -- of the tabbed button set
>>  if the selectedText of me is "Tab1" then --checks for active tab
>>    hide image|field "myImageName"|"myFieldName" --hides unwanted stuff
>>    show image|field "myImageName"|"myFieldName" --shows wanted stuff
>>  end if
>>  --... repeat until you've checked for all tabs
>> end mouseUp
>>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>

------------------------------------
When mind control works,
you won't know it.


More information about the use-livecode mailing list