Basic Stack/Card Question

Jan Schenkel janschenkel at yahoo.com
Tue Apr 6 02:08:06 EDT 2004


--- David Burgun <dburgun at dsl.pipex.com> wrote:
> Hi,
> 
> This is probably a very silly question, but as I'm a
> relative newbie 
> and am trying to get my head around some of the RR
> concepts I thought 
> I'd just ask this basic question here:
> 
> I have a Stack (window) that is setup so that there
> are some controls 
> that are constant within the window, and some that
> are on "Tabs" 
> within the window. When the user selects a tab, I
> want the constant 
> controls to remain where they are BUT the controls
> for that Tab to be 
> displayed. I had thought that I could use a seperate
> Card for each 
> "Tab", but it seems that a card covers the whole
> area of the Stack 
> (window). Is this correct?
> 
> If so, what is the best way to acheive what I want?
> Here is a simple 
> diagram of what I want:
> 
> 
> +-------------------------------------------+
> |               Stack X                     |
> +-------------------------------------------+
> |  ConstCtrl1   ConstCtrl2   ConstCtrl3     |
> |                                           |
> |    Tab1   Tab2   Tab3   Tab4              |
> |                                           |
> |  Tab1Ctrl1    Tab1Ctrt2       Tab1Ctrl3   |
> |                                           |
> |                                           |
> +-------------------------------------------+
> 
> With the "Tab1" Tab selected.
> 
> 
> 
> +-------------------------------------------+
> |               Stack X                     |
> +-------------------------------------------+
> |  ConstCtrl1   ConstCtrl2   ConstCtrl3     |
> |                                           |
> |    Tab1   Tab2   Tab3   Tab4              |
> |                                           |
> |  Tab2Ctrl1    Tab2Ctrt2       Tab2Ctrl3   |
> |                                           |
> |                                           |
> +-------------------------------------------+
> 
> With the "Tab2" Tab selected.
> 
> Can this be done with RR?
> 
> Another way I was shown was to create a Group of
> Controls and then 
> either Show or Hide them depending on which tab the
> user presses. I 
> can see that this would work, but I'm confused as to
> how I would 
> actually create them within the RR IDE, e.g.
> Controls from Tab1 would 
> overlap on Tab2 and it wouldn't be at all easy to
> edit or control?
> 
> Any suggestions/ideas more then welcome.
> 
> Thanks a lot  to all that helped with my Tabbed
> Button Question, I 
> see how to handle it now, but still a bit shakey on
> how to actually 
> implement it in practice!!
> 
> All the Best
> Dave
> 

Hi Dave,

My apologies for coming into this thread so late, but
I just thought I'd point you to two example stacks by
Shao Sean, available from the User Contributions
section at the RunRev website.

The first example uses show and hide of groups :
<http://www.runrev.com/downloads/usercontributions/usingtabs.zip>
The second exmple uses different cards :
<http://www.runrev.com/downloads/usercontributions/Using_Tabs_with_Cards.zip>

Being the tab=card type of developer myself, here's my
advice :

- put the tabbed button and any other control that you
want to show on all cards, into a group

- set the backgroundBehavior of this group to true, so
that it will automatically be placed on a new card you
create

- since I usually have as many cards in my stack as
there are tabs, the script of the tabbed button is

--
on menuPick
  # the menuHistory of a tabbed button contains
  # the number of the selected item
  go card (the menuHistory of me)
end menuPick
--

- then I create as many card as I need, and add the
appropriate controls to them

- if I find I need an extra control needs to be shared
among the different cards/tabs, I will edit the
background group and add it there

Hope this helped,

Jan Schenkel.

PS: for those wondering where the User Contributions
ran off to in the new website structure : click on the
'Resources' button in the top button bar, then you'll
find 'User Contributions' in the bar on the left-hand
side.
Or you can just bookmark :
<http://www.runrev.com/resources/usercontributions.shtml>

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/


More information about the use-livecode mailing list