[aida] Adding a graphic to a WebGrid
r.j.rothwell at gmail.com
Fri Apr 11 22:29:54 CEST 2008
On Fri, Apr 11, 2008 at 3:45 PM, Janko Mivšek <janko.mivsek at eranova.si>
> You can prepare and put in a cell anything you want with:
> aGrid column: aNumber addBlock: aBlock
> Block is called with a current row object as argument and it must return a
> valid WebElement.
This is just what I was looking for! Is there anything you haven't thought
For instance let we put an arrow from existing method images in first
> aGrid column: 1
> addBlock: [:rowObject | WebImage gif: #arrowCircledRedGif ]
That will do it!
This can also be used for coloring cell content appropriately. But for
> coloring entire row you have some prepared methods too:
> rowBlueIfTrue: [:rowObject | "some boolean expresion"]
> rowGreenIfTrue:, rowRedIfTrue:, rowYellowIfTrue: rowGrayIfTrue:
> rowBoldIfTrue: "for whole row to be bold"
Thank you...the WebGrid is truly useful. What did you think of my post last
weekend about handling nil values in a sortable column? I just subclassed
WebGrid for now, but it's nice to have the nil values sort without causing a
P.S. I have registered for Smalltalk Solutions; I'll take good notes and
share what I pick up!
> Best regards
> Janko Mivšek
> Smalltalk Web Application Server
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Aida