当列表元素是命令时如何对其进行标记?
如果我基于命令数组创建一个列表,并且某些命令的文本并未完全显示在列表中,尽管列表 preferredWidth
设置为表单 preferredWidth
,如何标记它们?
非常感谢
If I create a List based on an array of Commands, and the text of some Commands are not entirely shown in the List, although the List preferredWidth
is set to the Form preferredWidth
, how to ticker them ?
Thank you very much
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在您的 midlet 类中添加以下类或为此创建一个新的类文件:
像这样使用它:
Add the below class in your midlet class or create a new class file for that:
Use it like this:
尝试此代码,单击“显示列表”命令时它将在对话框中显示列表,并且最初还会启用股票代码。下面的代码显示了当列表包含在对话框中时如何使用上述类来查看列表中的股票代码。
不要忘记将您的列表设为最终列表,以便可以在内部类中使用它。
此代码在对话框中显示我的列表并最初启动股票。如果没有帮助,请发布您的代码,我会尝试查看它。
Try this code, it will show list in dialog box on clicking "Show list" command and will also enable ticker initially. Below is the code which shows how to use the above mentioned class to see ticker in list when list is contained in dialog.
Don't forget to make your list final so that it can be used in inner classes.
This code shows my list in dialog and starts ticker initially. If it doesn't help, post your code, i will try to see it.