selected tabbed button?

Klaus Major k_major at osnabrueck.netsurf.de
Sat Jun 22 07:03:01 EDT 2002


Hi Ken,

> I have created a tabbed button with 4 items in the list.
>
> When I click on it, the hilites for the selections change to the tab 
> that has been selected. This is good, it is the desired behavior.
>
> I want to navigate to various cards based upon which tab is selected.
>
> #1 What do I need do in script to know that a tab has been selected and 
> how do I know which tab has been selected?

if you have the same number of cards as button-tabs, then you can just 
script

on menupick
   go cd the menuhistory of me
end menupick

"menuhistory" is the number of the tab being clicked.
So you go to cd 1 when you click the first tab.
No need to put that into a variable because its an property of a button.

Else you might have to script a switch...case handler

on menupick what
   switch what
     case "The golden age of ballooning"
      go cd "MPFC" ## :-)
      break
     .....
   end switch
end menupick

The variable "what"  now holds the name of the tab being clicked.

> #2 How would I figure this out without asking this mailing list?

Modesty forbids an answer here... ;-)

Just a joke :-) (Oh, really ?)

It is sometimes difficult to find something n the docs
when you don't know exactly what you are looking for...

> Kee Nethery

Hope that helps.

Have a nice weekend.


Regards


Klaus Major
k_major at osnabrueck.netsurf.de




More information about the use-livecode mailing list