Option 1) In Pharo 1.4 or 2.0
I have used SGrid (a.k.a GridMorph) to display hundreds of rows without major performance problems.
Install
Menu -> Tools -> Configuration Browser -> MorphicGrid (Install)
Example
| matrix grid rows cols |
rows := 2.
cols := 3.
matrix := Matrix rows: rows columns: cols.
1 to: rows do: [ : r |
1 to: cols do: [ : c |
matrix at: r at: c put: SmallInteger maxVal atRandom ] ].
grid := (GridMorph
from: matrix
performing: {
'Heading 1' -> #asNumber .
'Heading 2' -> #asNumber .
'Heading 3' -> #asNumber })
title: 'GridMorph Example'.
grid openInWorld.
To interact with the grid (like bringing right button menu on any cell), you will have to fix issues related with the introduction of SmalltalkEditor class.
The following code open a tabular picture viewer using the GridMorph and the flickr API (the flickr API usage is based on this cast):
| xmlStream xmlDoc photos |
xmlStream := 'http://api.flickr.com/services/feeds/photos_public.gne?id=14577317@N06&lang=en-us&format=rss_200' asUrl retrieveContents readStream.
xmlDoc := XMLDOMParser parseDocumentFrom: xmlStream.
photos := OrderedCollection new.
xmlDoc allElementsNamed: #item do: [ : item| | thumbUrl photoUrl |
thumbUrl := ((item findElementNamed: #media:thumbnail) attributeAt: #url) asUrl.
photoUrl := ((item findElementNamed: #media:content) attributeAt: #url) asUrl.
photos add: (photoUrl -> (Form fromBinaryStream: thumbUrl retrieveContents readStream)) ].
((GridMorph
from: photos
performing: {'URL' -> [: assoc | assoc key asString ] . 'Picture' -> [: assoc | assoc value asMorph ]})
title: 'Flickr GridMorph Example') openInWorld.
Option 2) In Pharo 1.4 or 2.0
There is a class MorphTreeMorph, which includes a comment with several example grids.
Example
SimpleGridExample new open
ClassListExample new openOn: Collection.
Option 3) In Squeak:
There is a project called Skeleton – easy simulation system which uses eToys and you can access its code from: http://source.squeak.org/etoysinbox.html
Installation
Installer squeak
project: 'etoysinbox';
install: 'Skeleton'.
Example
SkSheet example "Move the red circle around"
I have not used it, but it seems to have basic formulas support.