我想要显示一个值表,并能够选择单元格。
我该如何在Pharo Smalltalk中做到这一点?我听说过Morphic小部件可以做到这一点,但我仍然是Smalltalk的新手。
发布于 2013-12-03 17:15:46
我会研究一下TreeModel类的副例。
我曾经这样做过:
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)).然后设置树根。
你在法罗3号还是法罗2号?这在Pharo 3中是有效的。
https://stackoverflow.com/questions/20304099
复制相似问题