Hi guys

I started to systematically defined widget example using the pragram <exampleWidget>


rowPrototype
    "Answer a prototypical row"
    "self rowPrototype openInHand"
    <exampleWidget>

    | sampleMorphs aRow |
    sampleMorphs := (1 to: (2 + 3 atRandom)) collect:
[:integer | EllipseMorph new extent: ((60 + (20 atRandom)) @ (80 + ((20 atRandom)))); color: Color random; setNameTo: ('egg', integer asString); yourself].
    aRow := self inARow: sampleMorphs.
    aRow setNameTo: 'Row'.
    aRow enableDragNDrop.
    aRow cellInset: 6.
    aRow layoutInset: 8.
aRow setBalloonText: 'Things dropped into here will automatically be organized into a row. Once you have added your own items here, you will want to remove the sample colored eggs that this started with, and you will want to change this balloon help message to one of your own!'.
    aRow color: Color veryVeryLightGray.
    ^ aRow

This means that GTool will get instances for free to play with and the finder get really handy to browse widgets.

If you want to join the effort you are welcome.

Stef

Attachment: Screen Shot 2014-10-05 at 14.23.10.pdf
Description: Adobe PDF document

Reply via email to