开发者

Add BitmapField to TreeField

开发者 https://www.devze.com 2023-02-02 13:18 出处:网络
In BlackBerry is it possible to add an image to child nodes of a TreeField? If开发者_开发百科 yes can any one please tell me how to achieve this.Like a ListField, a TreeField is not a subclass of Mana

In BlackBerry is it possible to add an image to child nodes of a TreeField? If开发者_开发百科 yes can any one please tell me how to achieve this.


Like a ListField, a TreeField is not a subclass of Manager so you can't 'add' other fields to it. The TreeField manages the expansion, contraction user input and informs your application what neeeds to be drawn by invoking:

net.rim.device.api.ui.component.TreeFieldCallback.drawTreeItem(TreeField treeField, Graphics graphics, int node, int y, int width, int indent)

Your application is then responsible for drawing what should be displayed.


possible

use

g.drawBitmap(...);

inside the

TreeFieldCallback.drawTreeItem(TreeField treeField, Graphics graphics, int node, int y, int width, int indent)

method

0

精彩评论

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