How do I use a Tabbed Button???
David Burgun
dburgun at dsl.pipex.com
Sun Apr 4 14:26:06 EDT 2004
Hi,
Sorry, it is difficult to explain, I'll try harder:
I have a number of "Tabs". When the user presses a Tab, I want the
controls under that "Tab" to be displayed and the ones on the old Tab
to disapear. So when the stack is first launched I want "Tab 1" to be
displayed which contains (say) a couple of PopUp menus and some check
boxes. When "Tab 2" is selected, I want the PopUps and Check Boxes in
"Tab 1" to disapear and the controls defined for "Tab 2" to be
displayed (maybe some Raidio Buttons and Text Fields").
Then as a purely visual thing, within each "Tab" I want to group
together (just visually) certain controls. I'd like to be able to
display a rectangle around each group with the title for that grouped
displayed in the top line, like this:
+---Tab1 Group1--------------------------+
| |
| PopUp1 CheckBox CheckBox |
| |
+----------------------------------------+
+---Tab1 Group2--------------------------+
| |
| Radio1 Radio2 Text CheckBox |
| |
+----------------------------------------+
Then the same for Tab2, Tab3, Tab4 etc.
The kind of action I am looking for is like the Project Inspector
Window in the CodeWarrior IDE. When you click the "Arrributes" Tab
you see the controls for that Tab and the screen is visually split
into three groups, when you click the "Targets" tab the display
switches to the controls for that Tab.
Maybe this isn't the right control for doing this??
Thanks for you help, I am playing around with your code now.
All the Best
Dave
>Hi David,
>
>>Hi,
>>
>>I have created a "Tabbed Button" and I'm now trying to figure out
>>how to use it!
>
>:-)
>
>>I can't seem to find any information on this anywhere, could
>>someone point me in the right direction please?
>
>It is somewhere in the dox, but i did not find it yet ;-)
>
>>I just want a number of tabs running across the top of the window
>>with a number of controls in each Tab.
>>When the user presses a Tab, I want those controls to become active.
>>
>>Also how can I draw a "Group Box", I would like something like this:
>
>What do you mean with "group box"?
>Probably not "the showborder" of groups?!
>
>>+--Group1 Name------------------------------------+
>>...
>>All in the same "Tab".
>
>Sorry, don't get this one...
>
>
>Anyway, the basic message for dealing with tabbed buttons is:
>
>on menuPick newTab,oldTab
> -- do something
> end menuPick
>
>Tabbed buttons receive these 2 arguments with the "menupick" message...
>(...and ONLY tabbed buttons!)
>
>So if i understand you right, your TABS are supposed to enable/disable
>the appropriate groups?
>
>Then you should name your groups after your tabs (or vice versa :-)
>and script your button:
>
>on menupick newTab, oldTAb
> lock screen
> ## just in case you have LOTS of controls in your groups ;-)
> disable group oldTab
> enable grp newTab
> unlock screen
>end menupick
>
>That will do the trick...
>
>Drop a line in case i misunderstood you completely ;-)
>
>Hope that helps...
>
More information about the use-livecode
mailing list