Thanks, I am very grateful to you!

On Jan 29, 9:46 pm, eleven0eight Kidd <[email protected]> wrote:
> The getParentElement() is a native JNSI call that returns the parent
> element BUT remember it returns a JavaScript object. Therefore, you
> need to cast it appropriately.
>
>     DOM.setStyleAttribute((com.google.gwt.user.client.Element)
> theTitle.getElement().getParentElement(),
> "backgroundColor","#FF0000" );
>
> ..
> Hendrix
>
> On Jan 29, 3:08 am, "[email protected]"
>
>
>
> <[email protected]> wrote:
> > I have made changes:
>
> >   public void onModuleLoad() {
>
> >                 final Label theTitle = new Label();
> >                 theTitle.setText("Livesbook");
> >                 theTitle.setStyleName("livesbook");
>
> >                 DockPanel thePanel = new DockPanel();
> >                 thePanel.setSize("100%","100%");
> >                 thePanel.add(theTitle,thePanel.NORTH);
> >                 
> > DOM.setStyleAttribute(theTitle.getElement().getParentElement(),
> > "backgroundColor","#FF0000" );
>
> > and reseived an error.
>
> > [ERROR] Line 67: The method setStyleAttribute(Element, String, String)
> > in the type DOM is not applicable for the arguments (Element, String,
> > String)
>
> >  Сould  you  say - why?
>
> > On Jan 28, 11:17 pm, "[email protected]"
>
> > <[email protected]> wrote:
> > > It is interesting why there is setCellHeight() function in the
> > > DockPanel class and there is no similar function for colour ...
>
> > > darkflame wrote:
> > > > You have to use the Dom for this I think;
>
> > > > How I did it was;
>
> > > > DOM.setStyleAttribute(WidgetInTheCell.getElement().getParentElement(),
> > > >                                    "backgroundColor", HexColour);
>
> > > > Where HexColour was the colour I wanted ("#FF0000" for instance), and
> > > > WidgetInTheCell was a widget in the cell. (it dosnt colour the widget,
> > > > but looks at its parent, which is the cell)
>
> > > > Theres probably a better way then this, I'm still learning myself ;)
>
> > > > On Jan 28, 8:07 pm, "[email protected]"
> > > > <[email protected]> wrote:
> > > > > May I change background color of center cell or any other cell of
> > > > > dockPanel?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to