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

[REBOL] Re: [view] Adding objects to a face....

From: Christophe::Coussement::mil::be at: 27-Sep-2004 9:11

Hi, This is how I handle this problem in my scripts...
>> ? layout
USAGE: LAYOUT specs /size pane-size /offset where /parent new /origin pos /styles list /keep DESCRIPTION: Return a face with a pane built from style description dialect. LAYOUT is a function value. ARGUMENTS: specs -- Dialect block of styles, attributes, and layouts (Type: block) REFINEMENTS: /size pane-size -- Size (wide and high) of pane face (Type: pair) /offset where -- Offset of pane face (Type: pair) /parent new -- Face style for pane (Type: object word block) /origin pos -- Set layout origin (Type: pair) /styles list -- Block of styles to use (Type: block) /keep -- Keep style related data 'layout takes a block! as arg, so you can compose the block! _before_ submitting it to the layoutization.
>> block-layout: [Item1: text "Hi!"]
== [Item1: text "Hi!"]
>> view A: layout block-layout >> append block-layout [Item2: text "Bye!"]
== [Item1: text "Hi!" Item2: text "Bye!"]
>> view A: layout block-layout
With this approach, you're able to compose dynamically your layouts. Hope this helps ! ==christophe