RichTextArea:setEnabled

24 views
Skip to first unread message

Parvez Shah

unread,
Sep 29, 2009, 3:13:59 AM9/29/09
to google-we...@googlegroups.com
Hello I am facing problem in making RichTextArea setEnabled(false); is it like RichTextArea is not meant to be setEnabeled(false);


public void onModuleLoad() {
        RichTextArea area = new RichTextArea();
        area.setEnabled(false);
        area.setHTML("<b>Name:</b> some name </br> <b>Address:</b> some addrsss with reallly long addresss lerts test</br><b>Tin:</b> N/A");
       
        RootPanel.get().add(area);
       
    }
   

Prashant

unread,
Sep 29, 2009, 3:49:49 AM9/29/09
to google-we...@googlegroups.com
do this...

RootPanel.get().add(new RichTextToolbar(areat));
RootPanel.get().add(area);

copy RichTextToolbar.java, RichTextToolbar$Strings.properties & all the images in the folder from "\gwt-windows-1.7.1\samples\Showcase\src\com\google\gwt\sample\showcase\client\content\text" to your project....

Prashant

unread,
Sep 29, 2009, 3:50:11 AM9/29/09
to google-we...@googlegroups.com
ohh, that's area only not areat

Parvez Shah

unread,
Sep 29, 2009, 4:05:54 AM9/29/09
to google-we...@googlegroups.com
So u mean i cant use RichTextArea without RichTextToolbar ..
The document says nothing like this

Prashant

unread,
Sep 29, 2009, 4:12:50 AM9/29/09
to google-we...@googlegroups.com
if you need the toolbar you must use RichTextToolbar. I am not much familiar with RichTextArea so I cannot what you can/can't do with RichTextArea alone...

yes, docs says noting about it, refer to gwt showcase for working examples...

Parvez Shah

unread,
Sep 29, 2009, 11:24:12 AM9/29/09
to google-we...@googlegroups.com
Bump --
any one has any idea on how to make RichTextArea  setEnabeled(false)

tskaife

unread,
Sep 29, 2009, 11:54:35 AM9/29/09
to Google Web Toolkit
You don't need to toolbar to use the RichTextArea, but it's pretty
useless without it since you won't be able to do any formatting with
the text.

But as far as disabling the RichTextArea, I don't think it's going to
work since the RichTextArea is rendered as an iframe element. If you
want to have a similar effect of disabling you can swap out the
RichTextArea with an HTML element that has styling of a disabled text
box (black border, light gray backround, dark gray text). Then swap
back in the RichTextArea when you want to enable it.

On Sep 29, 10:24 am, Parvez Shah <parvezs...@gmail.com> wrote:
> Bump --
> any one has any idea on how to make RichTextArea  setEnabeled(false)
>
>
>
> On Tue, Sep 29, 2009 at 1:42 PM, Prashant <antsh...@gmail.com> wrote:
> > if you need the toolbar you must use RichTextToolbar. I am not much
> > familiar with RichTextArea so I cannot what you can/can't do with
> > RichTextArea alone...
>
> > yes, docs says noting about it, refer to gwt showcase for working
> > examples...
>
> > On Tue, Sep 29, 2009 at 1:35 PM, Parvez Shah <parvezs...@gmail.com> wrote:
>
> >> So u mean i cant use RichTextArea without RichTextToolbar ..
> >> The document says nothing like this
>
> >> On Tue, Sep 29, 2009 at 1:20 PM, Prashant <antsh...@gmail.com> wrote:
>
> >>> ohh, that's area only not areat
>
> >>> On Tue, Sep 29, 2009 at 1:19 PM, Prashant <antsh...@gmail.com> wrote:
>
> >>>> do this...
>
> >>>> RootPanel.get().add(new RichTextToolbar(areat));
> >>>> RootPanel.get().add(area);
>
> >>>> copy RichTextToolbar.java, RichTextToolbar$Strings.properties & all the
> >>>> images in the folder from
> >>>> "\gwt-windows-1.7.1\samples\Showcase\src\com\google\gwt\sample\showcase\cli ent\content\text"
> >>>> to your project....

Parvez Shah

unread,
Sep 29, 2009, 12:01:40 PM9/29/09
to google-we...@googlegroups.com
Thanks .. got the idea
Reply all
Reply to author
Forward
0 new messages