Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Fwd: Re: choice to update a pane

From: sanghabum:aol at: 24-Jun-2001 15:49

Francois Prowse [mailto:[fprowse--uu--net]]
> > so if I seleect the 1st option I get a particular pane, the second option > > a different pane...... > > > > Thats the first problem... > > > > the second problem is I want to then be able to update all of the panes > > able to be choosen above with specific information that is common to them > > all.... > >
Hi Francois, I think the code below demonstrates what you want.....there's a main panel and three subpanels. The subpanel is selected by a switch. Before the selected one is displayed ("Show Mypanel" I have some nonsense code that does stuff with the variables in each subpanel. If you literally meant you have fields common to each panel, then I don't think you can do that: either promote them to the main panel, or repeat the fields (with different names) in each subpanel. Hope that helps, Colin. =========== rebol [title: "panel example"] ;;define layouts ;;============ mainlayout: layout [my-text-list: text-list data [1 2 3] [if (length? my-text-list/picked) = 1 [ ;update fields in each subpanel field1-1/text: mold now field1-2/text: mold system/stats field2-1/text: field2-1/text + 1 field3-1/text: field2-1/text + 10 if (field2-1/text // 2) [field3-2/text: field2-1/text + 10] switch My-Text-List/picked [1 [my-panel/pane: panel1] 2 [my-panel/pane: panel2] 3 [my-panel/pane: panel3] ] ; switch show my-panel ] ; if ] ; action facet my-panel: box 400x600 ;field for subpanels ] ;layout Panel1: layout [info "Panel1" Field1-1: info 200 field1-2: info 300] panel2: layout [info "panel2" Field2-1: info 500] panel3: layout [info "panel3" field3-1: info 300 field3-2: info 200 ] ;; Initialise data fields befoere view ''============================= field2-1/text: 1 field3-1/text: 0 unview/all view mainlayout halt =========== -- Attached file included as plaintext by Listar -- Return-Path: <[rebol-bounce--rebol--com]> Received: from ( []) by (v78_r3.8) with ESMTP; Sun, 24 Jun 2001 15:14:56 -0400 Received: from ( []) by (v79.20) with ESMTP id MAILRELAYINXC17-0624151431; Sun, 24 Jun 2001 15:14:31 -0400 Received: from ( []) by (8.10.1/8.10.1) with ESMTP id f5OJ6xL26709; Sun, 24 Jun 2001 12:06:59 -0700 Received: from (localhost []) by (8.10.1/8.10.1) with ESMTP id f5OJ68Q30134; Sun, 24 Jun 2001 12:06:08 -0700 Received: with LISTAR (v0.129a; list rebol); Sun, 24 Jun 2001 12:06:08 -0700 (PDT) Received: from (IDENT:[root--brando--rebol--net] []) by (8.10.1/8.10.1) with ESMTP id f5OJ67Q30129 for <[rebol-list--lists--rebol--net]>; Sun, 24 Jun 2001 12:06:07 -0700 Received: from ( []) by (8.10.1/8.10.1) with ESMTP id f5OJ66L26696 for <[rebol-list--rebol--net]>; Sun, 24 Jun 2001 12:06:07 -0700 Received: from augustus ( []) by (8.9.3/8.8.5) with SMTP id PAA25749 for <[rebol-list--rebol--net]>; Sun, 24 Jun 2001 15:06:06 -0400 (EDT) X-MindSpring-Loop: [rebol-list--rebol--com] Received: from ([]) by augustus (Earthlink Mail Service) with ESMTP id tjcegs.15d.37kbpol for <[rebol-list--rebol--com]>; Sun, 24 Jun 2001 15:06:04 -0400 (EDT) Received: from machine ([]) by (Netscape Messaging Server 4.15) with SMTP id GFG7ZG00.ENE; Mon, 25 Jun 2001 05:11:40 +1000 Received: from ([]) by (Claudes-Volcanic-MailRouter V2.9c 9/6230191); 25 Jun 2001 05:06:30 From: "Anton" <[arolls--bigpond--net--au]> To: <[rebol-list--rebol--com]> Cc: "Francois Prowse" <[fprowse--uu--net]> Subject: [REBOL] Re: choice to update a pane Date: Mon, 25 Jun 2001 05:04:47 +1000 Message-ID: <[NOEDJEJPNBNKDKGDCALOOEKKCGAA--arolls--bigpond--net--au]> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <[Pine--GSO--4--21--0106241355280--17541-100000--anocserve1--ams--ops--eu--uu--net]> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-archive-position: 8200 X-listar-version: Listar v0.129a X-original-sender: [arolls--bigpond--net--au] Precedence: bulk Reply-to: [rebol-list--rebol--com] X-list: rebol Ok, well, I have not really used choose before, it is a surprise! But you can do this: choose ["one" "two" "three"] func [a b][probe a/text] == "one" ; I pressed first item To put it into a layout: view center-face layout [ button "choose" [ choose ["one" "two" "three"] func [a b][probe a/text] ] ] I am not sure what the arguments 'a and 'b are in the function supplied to 'choose. Anyway, instead of [probe a/text], you could change your pane. I am not sure what exactly you mean by "pane". In rebol, pane is taken to mean the sub-faces of a face. You probably are talking in non-rebol terminology, if so, I think you should call it panel in rebol. To change panels, see documentation: Click on "How to Create Subpanels" or go straight to: This is my go at it: do (I am working on it right now, so there might be some bugs) If you need more help, you know who to call. :) Anton.