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

[REBOL] Re: Little questions, big answers...

From: arolls:bigpond:au at: 6-Sep-2001 20:20

I thought you wanted to do that! I don't recommend writing a file. That's more work than necessary. lay: layout [size 300x300] repeat n 10 [ append lay/pane make get-style 'field compose [ offset: (n * 10x28) text: (join "field" n) ] ] view lay To see how this works, you will need to know how make, compose and get-style work. But here is an example of the above that requires more manual labour. lay: layout [size 300x300] append lay/pane make get-style 'field [] lay/pane/1/offset: 10x10 view lay ; now close the window append lay/pane make get-style 'field [] lay/pane/2/offset: 20x40 view lay Get-style takes a word like 'field and returns you a pointer to the default, "archetype", field face that is set up by rebol VID. Make makes a copy of that object so we have our own. Without make there, we would be modifying one face, and appending it multiple times to the pane list. You can do it, but they will all have the same position, size, text, etc. which will cause you problems. There is also list. view layout [list [field] data [["hello"] ["there"]]] This requires a bit of work to set up and manipulate, but there are docs lying around.