如何更改视图中的按钮

发布于 2024-09-25 16:13:10 字数 134 浏览 0 评论 0原文

我在查看器上有一个切换按钮![alt text][1]

问题是,当它打开时,如何恢复最后的状态。 就像即使默认值为 false 一样,如何以编程方式将其设置为 true 。

在plugin.xml 中,默认状态为true。

I have a toggle button that is on the Viewer![alt text][1]

the problem is , when it turn on , How can recover the last status .
like even though the default value is false , how to set it true programmatically.

In the plugin.xml , the default status is true.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

大姐,你呐 2024-10-02 16:13:10

如果通过命令贡献它,则需要切换命令的状态(请参阅 HandlerUtil.toggleCommandState() 方法),然后调用 ICommandService.refreshElements() 来更新该命令的所有贡献

If have contributed it via commands, you need to switch the state of the command (see HandlerUtil.toggleCommandState() method) and then call ICommandService.refreshElements() to update all the contributions for that command

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文