J2ME 波兰语 FramedForm 命令
我正在使用 FramedForm 使用 J2ME Polish 开发一个应用程序。
我试图将与 Command1 关联的一个项目附加到 FramedForm,并将与 Command2 关联的另一个项目附加到 FramedForm 的底部。
FramedForm menuForm = new FramedForm("Menu");
Command command1 = new Command("command1", Command.ITEM, 1);
Command command2 = new Command("command2", Command.ITEM, 2);
IconCustomItem item1 = new IconCustomItem("test1", null);
item1.addCommand(Command1);
menuForm.append(item1);
IconCustomItem item2 = new IconCustomItem("test2", null);
item2.addCommand(Command2);
menuForm.append(Graphics.BOTTOM, item2);
问题是页脚项与这两个命令相关联。我尝试使用removeCommands()但没有成功。如何将页脚项目仅关联到 Command2?
谢谢。
I'm developing an application with J2ME Polish using a FramedForm.
I'm trying to append an item associated with a Command1 to the FramedForm and another item associated with a Command2 to the bottom of the FramedForm.
FramedForm menuForm = new FramedForm("Menu");
Command command1 = new Command("command1", Command.ITEM, 1);
Command command2 = new Command("command2", Command.ITEM, 2);
IconCustomItem item1 = new IconCustomItem("test1", null);
item1.addCommand(Command1);
menuForm.append(item1);
IconCustomItem item2 = new IconCustomItem("test2", null);
item2.addCommand(Command2);
menuForm.append(Graphics.BOTTOM, item2);
The problem is that the footer item is associated with both commands. I've tried using removeCommands() with no success. How can I associate the footer item only to the Command2?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试为每个项目设置默认命令,而不是添加单个命令。
例如:
请参阅以获取有关项目命令的更多信息:
Try setting a default command to each item, instead of adding a single command.
Like:
See for more info for commands on Items:
我解决了聚焦底部的问题框架。
I solved the problem focusing the bottom frame.