开发者

BlackBerry: TreeField with BitmapField

I want to display the contacts in a TreeField like:

An image followed by a username

My understanding is that I use a Bit开发者_StackOverflow社区mapField to display the image, but I don't see how to combine a BitmapField with a TreeField.


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


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜