我在表单的右侧菜单中添加了一个命令。 我想通过代码单击命令,但
pointerPressed()
pressed()
命令不是组件。如何通过代码点击命令?
其实有一个按钮,我们只是为你做的。用途:
Button btn = toolbar.findCommandComponent(cmd);
然后,您可以使用事件并自定义
Button