Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: Nested panels
Pages: [1] Print
Author Topic: Nested panels  (Read 1021 times)
JohnW
Newbie
*
Offline Offline

Posts: 9


View Profile
Nested panels
« on: January 15, 2004, 03:52:29 PM »

Is it possible to nest a panel within another panel?

For example, I have panel1 a box 400x800
on top of this panel I want to have another panel that has 3 buttons.

Is there a way to do this?
Logged
GerardCote
Newbie
*
Offline Offline

Posts: 1


View Profile
Nested panels
« Reply #1 on: January 16, 2004, 10:36:55 AM »

Hi JohnW,

I don't see any reason not to be able to add a panel on another panel using View.

Instead of giving you this single recipe here I will instead invite you to look at the vid-usage.r script in the official Library REBOL Library.

It was posted about january 10th 2004 and I am actually reviewing it for Cybarite to get any constructive feedback about it. So he'll be able to do the necessary adjustments and small fixes for the small flaws I found.

Then you'll have a lot to experiment with about View. And it will be more pleasant to read than my lengthy explanations would be. If you need more information come back.

It would also be nice to start a room for sharing design ideas and REBOL code to play with. We could name it the REBOL SANDBOX.

Some programmers that already use REBOL for the real thing will even be invited to write in condensed form the way they attack a new problem when elaborating their solution. Expressing their way of doing thing in a general way and also based on some suggested problem to solve we will serve them as thinking tools to start with.

May be some SMALL projects could similarly be started collectively this way and even just small code examples for exploring the many refinements of most REBOL words would be as useful as the rest.

In fact Im just planning to create some REBOL dictionary add-on that will take the form of many small code examples.

I'll share it along the process with the members of this forum to get some code ideas and feedback about the resulting product as soon I will be ready.

Regards,
Gerard
Logged
DefiantPc
Administrator
Jr. Member
*
Offline Offline

Posts: 70


View Profile
Nested panels
« Reply #2 on: January 17, 2004, 11:16:28 AM »

Here is a small example of stacked panels.

Code:
rebol[title:"Stacked panels"]

out: layout [
origin 0

at 1x1 p: box ivory 800x600
at 400x30    text bold black "This in the main box,  panel 0 is on top of this box."

        ]

  p/pane: layout [

  origin 0 space 0x0
  backdrop navy
  across
     text bold white "This in panel 0"

  p1: box 160x145  black
  below
  text bold white "Sub- panel 1 is on top of the black box above"

  p2: box 360x80 red
  text bold white "Sub- panel 2 is ontop of the red box above"

  ]

   p1/pane: layout[

   origin 0
   space 2x0
   backdrop  green
   button "p1 butt1" [unview]
   button "p1 butt2" [unview]
   button "p1 butt3" [unview]
   text bold black "Sub- panel 1"

    ]

   p2/pane: layout[

   origin 0
   backdrop white
    space 1x0
    across
   button "p2 butt1" [unview]
   button "p2 butt2" [unview]
   button "p2 butt3" [unview]
   below
   text bold black "Sub- panel 2"

   ]

       view out

Hope this helps,

Smiley  -Maryjane
« Last Edit: January 18, 2004, 10:08:46 AM by DefiantPc » Logged
Pages: [1] Print 
Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: Nested panels
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 03, 2008, 09:44:53 PM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2315 Posts in 597 Topics by 4204 Members
Latest Member: hledamka.com

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc