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

[REBOL] Re: draw has no access to the current face

From: gscottjones:mchsi at: 29-Sep-2002 13:53

From: "G. Scott Jones"
> Some other clever chap may know how to append init > with the style form within a layout block.
Oh (in answer to self but not implying self to necessarily be clever ;-): draw-layout: [ style draw-button box 24x24 with [ effect: [ draw [pen black fill-pen x-color circle 12x12 10] ] user-data: 'white append init [ replace effect/2 'x-color user-data] ] h2 "Draw buttons" across r-btn: draw-button [ print "hey, I'm red"] with [user-data: 'red] b-btn: draw-button [ print "hey, I'm blue"] with [user-data: 'blue] y-btn: draw-button [ print "hey, I'm yellow!"] with [user-data: 'yellow] g-btn: draw-button [ print "hey, I'm green!"] with [user-data: 'green] ] view center-face layout draw-layout