黑莓:TreeField 与 BitmapField

发布于 2024-10-10 02:28:12 字数 416 浏览 12 评论 0原文

我想在 TreeField 就像:

图像后跟用户名

我的理解是我使用 BitmapField 来显示图像,但我不知道如何组合 BitmapField 带有 树域

I want to display the contacts in a TreeField like:

An image followed by a username

My understanding is that I use a BitmapField to display the image, but I don't see how to combine a BitmapField with a TreeField.

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

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

发布评论

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

评论(3

囚我心虐我身 2024-10-17 02:28:12

您不能将其他字段与 TreeField 一起使用。您需要实现 TreeFieldCallback.drawTreeItem() 方法并自己进行绘制

You can't use another field with a TreeField. You need to implement the TreeFieldCallback.drawTreeItem() method and do the drawing yourself

走走停停 2024-10-17 02:28:12

请参阅我对类似 StackOverflow 问题的回答:“自定义 Blackberry Treefield”。

在该答案中,我重新绘制了 TreeField 以及 位图 图像替换 TreeField

See my answer to a similar StackOverflow question: "Customising Blackberry Treefield."

In that answer, I've re-drawn each row of a TreeField along with a Bitmap image replacing the default (+)-icon of TreeField.

情释 2024-10-17 02:28:12

您可以通过使用graphics.drawBitmap()方法和graphics.drawText()方法并使用实现类的drawTreeItem()方法中的index和y参数来完成TreeFieldCallback 接口

You can do it by using graphics.drawBitmap() method and graphics.drawText() method and using the index and y parameters inside the drawTreeItem() method of class which implements TreeFieldCallback interface

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