select tabs

David Burgun dburgun at dsl.pipex.com
Tue Apr 27 16:51:13 EDT 2004


>Hi,
>How do I select (click) a tab via a script ?
>thanks, hershrev

Here's something I did that does the trick.

I had a Tab button that is associated with number of cards, e.g. TabA 
goes to CardA, TabB to CardB etc. I found that if the user selected 
TabB and then saved and quit the app, when the Stack next came up 
that CardA would be displayed but TabB would be selected. To remedy 
this I added the following to the Stack Script:

on preOpenStack
  put the menuHistory of  button "TabbedButton" of "TabGroup" into 
myLastSelectedTab
  put menuttem myLastSelectedTab  of  button "TabbedButton of 
"TabGroup" into myMenuItem
  send "menuPick myMenuItem" to group "TabGroup"
  pass preOpenStack
end preOpenStack

Not sure if there is a better way, but this works ok for me.

Hope this Helps
Dave



More information about the use-livecode mailing list