Вопрос

In my application, I have to add the choicegroup on Canvas.Is there any method to draw a choicegroup on canvas? Is there any solution to make a custom choicegroup and implement it on canvas?

Это было полезно?

Решение

MIDP 2 lcdui API does not allow ChoiceGroup to be placed within Canvas.

Being a subclass of Item, ChoiceGroup can be only within Form objects.

  • The closest you probably can get to it is to design your own custom object implementing Choice - the same interface as ChoiceGroup. To have such an object within Canvas, you would have to write your own, custom code for rendering its contents (size, fonts, alignment, wrapping etc) and to handle user events such as traversal, selection, and maybe something similar to item commands and listener as well as state and listener if you need these.
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top