Python设想框架
我刚刚开始使用设想框架。在 4.x 版本中,我看到了一些示例,但我需要一个好的文档:链接。
如何向设想工作台添加自定义按钮,或者如何创建类似的按钮?
I just started with envisage framework. In the 4.x version I saw a few example, but I need a good documentation: link.
How can I add custom buttons to the envisage workbench, or how can I create a similar one?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查找文档的最佳位置是 Acmelab 示例 Envisage 源代码树。
我假设当您谈论自定义按钮时,您指的是工具栏上的按钮。首先,您需要创建一个 WorkbenchActionSet,在其中添加工具栏,然后定义您的操作并为其分配按钮图像。这是(稍作修改的)Acmelab 示例,其中删除了不相关的部分:
test_action_set.py
new_view_action.py
The best place look for documentation is the Acmelab example in the Envisage source tree.
I'm assuming when you talk about custom buttons you mean buttons on a toolbar. First you need to create a WorkbenchActionSet, add your toolbar there, and then define your actions and assign them a button image. Here is the (slightly modified) Acmelab example with non-relevant parts taken out:
test_action_set.py
new_view_action.py