Есть форма. А там ChoiceGroup (POPUP) и TextBox.
| Код | PopupCG=new ChoiceGroup("Popup Gruppa", Choice.POPUP,Group1,null); Tekst=new TextBox("Simple TextBox","Body of this simple TextBox",256,0); myForm.append(PopupCG); myForm.append(Tekst); myForm.addCommand(choose_it); myForm.addCommand(exitMidlet); myForm.setCommandListener(this);
|
Хочу чтобы вот этот choose_it появилься только когда курсор стоит на PopupCG. И сделал вот так:
| Код | PopupCG=new ChoiceGroup("Popup Gruppa", Choice.POPUP,Group1,null); Tekst=new TextBox("Simple TextBox","Body of this simple TextBox",256,0); myForm.append(PopupCG); myForm.append(Tekst); PopupCG.addCommand(choose_it); myForm.addCommand(exitMidlet); myForm.setCommandListener(this);
|
но на PopupCG нельзя добавит SetCommandListener. Как быть? |