5

I’d like to display a table of values and be able to select cells.

How would I do this in Pharo Smalltalk? I’ve heard talk of Morphic widgets able to do this, but I’m still really new to Smalltalk.

Edward Ocampo-Gooding
  • 2,782
  • 1
  • 23
  • 29
  • Maybe you should take a look at Spec. But I have no idea if there is any support for that – Uko Nov 30 '13 at 19:01
  • Glamour can probably do that too (http://www.moosetechnology.org/tools/glamour) – Max Leske Dec 01 '13 at 13:22
  • Possible duplicate of http://stackoverflow.com/questions/4674116/are-there-any-open-source-spreadsheet-implementations-in-smalltalk-which-are-use – Hernán Dec 04 '13 at 02:46

1 Answers1

2

I would look into TreeModel class side examples.

I used to do that:

tree := TreeModel new.
tree openWithSpec.

tree columns: (Array 
    with: (TreeColumnModel new displayBlock: [:node | node content first asString ]; headerLabel: 'Name'; yourself)
    with: (TreeColumnModel new displayBlock: [:node | node content second asString ]; headerLabel: 'Last Name'; yourself)
    with: (TreeColumnModel new displayBlock: [:node | node content third asString ]; headerLabel: 'Age'; yourself)
    with: (TreeColumnModel new displayBlock: [:node | node content fourth asString ]; headerLabel: 'Gender'; yourself)).

then set the tree roots.

Are you in Pharo 3 or Pharo 2 ? This works in Pharo 3.

mmmmmm
  • 32,227
  • 27
  • 88
  • 117