Monday, October 1, 2012

Add a radio button in RichTextArea

There is a RichTextArea

private final RichTextArea rta = new RichTextArea();

and I'd like when I press an asterisk to add a radio button in this RichTextArea.

I wrote

 if(event.getCharCode()=='*')
   
{            
     
RadioButton radio0 = new RadioButton("group0", "");
     
HorizontalPanel hp = new HorizontalPanel();
     hp
.add(radio0);
     
RootPanel.get().add(hp);
   
}

it creates a radio button out of the RTA but I can't add it in the RTA, specifically where the cursor is and without the asterisk.

Any idea how to do that? Thank you very much for any help in advance.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/ZI7WC_zgqBUJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment