tabbed windows
Klaus Major
klaus at major-k.de
Wed Dec 7 15:48:49 EST 2005
Hi Ton,
> Marty,
>
> When I started using Revolution, this was quite a mystery to me as
> well, but it works sooooo easy...
> Create a tabbed button with for instance 3 tabs in it: "My First
> Tab", "Tab Number Two" and "The Last Tab"
> The script of this button (or at least, the way I do it):
>
> ON menuPick vNew
> put the text of me into vTabs
> REPEAT with a = 1 to the num of lines of vTabs
> try
> hide grp (line a of vTabs)
> END try
> END REPEAT
> try
> show grp vNew
> END try
> END menuPick
>
> To make different objects show when you click on a tab, just create
> a group of these objects and name them the same as the tabs
>
> Maybe there are better ways, but this one helps me out every time :-)
especially for the tabbed button control you can use a special syntax
in the menupick handler:
on menupick old_menuitem, new_menuitem
show grp new_menuitem
hide grp old_menuitem
end menupick
Check the docs for "menupick"
With "Tabbed buttons" it will accept 2 params!
The first is the now selected menuitem, the second the previously
active menuitem!
Cool, isn't it?!!! ;-)
> Good luck & happy coding!
>
>
> Ton Kuypers
> Digital Media Partners bvba
> Tel. +32 (0)477 / 739 530
> Fax +32 (0)14 / 71 03 04
> http://www.dmp-int.com
Best
Klaus Major
klaus at major-k.de
http://www.major-k.de
More information about the use-livecode
mailing list