首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Pharo中绘制表格

在Pharo中绘制表格
EN

Stack Overflow用户
提问于 2013-12-01 02:37:47
回答 1查看 749关注 0票数 5

我想要显示一个值表,并能够选择单元格。

我该如何在Pharo Smalltalk中做到这一点?我听说过Morphic小部件可以做到这一点,但我仍然是Smalltalk的新手。

EN

回答 1

Stack Overflow用户

发布于 2013-12-03 17:15:46

我会研究一下TreeModel类的副例。

我曾经这样做过:

代码语言:javascript
复制
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中是有效的。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20304099

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档