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