Add BitmapField to TreeField
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
精彩评论