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


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to