Robert Brenstein rjb at
Tue Sep 28 08:19:18 EDT 2004

>--- Jim Carwardine
><JimCarwardine at> wrote:
>>  I have a tabbed button that I¼m using to navigate to
>>  certain cards.  I can¼t
>>  seem to get the tabs to behave in that I have to
>>  click another tab then
>>  click the tab I want to get the tab I want to
>>  respond.  I thought the
>>  menuHistory took care of that automatically.  I can
>>  get the menuHistory of
>>  the button and identify the clicked tab, but the
>>  button doesn¼t seem to know
>>  what tab was last clicked.  What am I missing?  Jim
>>  --
>Hi Jim,
>At the risk of rehashing the basics : when the user
>clicks on a tab, your button will get a 'menuPick <new
>item name>,<old item name>' message.
>If you want to get the number of the current selected
>tab, you can use the 'menuHistory' property, and if
>you want to trigger a change from within a script, you
>can also set this menuHistory property of that control
>and it will happily call your menuPick handler.
>Which part doesn't work properly, or what are you
>having troubles with ?
>Jan Schenkel.
>"As we grow older, we grow both wiser and more 
>foolish at the same time."  (La Rochefoucauld)

If the misbehavior occurs when the stack/card 
with tabs is opened, you may need a preopen to 
rematch the selected tab with the card you are 
on. If your tab button is in the background 
group, it stays at the last selected tab but this 
may not be the card you open to.

I don't think this applies here but on some 
systems, the click position is miscalculated -- I 
need to click to the right of the tab in order to 
get the desired reaction. This is noticable only 
when you have a large number of tabs and click 
the tabs on the right side.


More information about the use-livecode mailing list