Tab panels

James Hurley jhurley0305 at sbcglobal.net
Fri Mar 25 21:12:45 EDT 2011


Thanks everyone. You always come through.

You have taught me a new property: MenuHistory

I have found the following works for me. In place of the "MenuPick" handler I used only a "mouseUP" handler. 

(The TabMenu object handles all the highlighting chores.)

on mouseUp
   put the menuhistory of me into tNum
   put "Task" & tNum into tName
   send tName to me in 0 millisec
end mouseUp

on task1
   answer "Taskone"
end task1

on task2
   answer "TaskTwo"
end task2

on task3
   answer "TaskThree"
end task3


Or, more simply:  Get the "text" of the TabMenu and run that line. (I haven't tried this.)

on mouseUp
   put the menuhistory of me into tNum
   put line tNum of the text of me into tTask
   switch tTask
      case whatever
         etc.
         break
         etc.
   end switch
end mouseUp

I would try this, but the power is out for the fourth time this year due to heavy snow. Don't believe everything you hear about California. I'm running on a generator, and borrowed time.

Jim






More information about the Use-livecode mailing list