I'm just guessing and shooting from the hip, but
your problem is probably not a bug.

I've only been coding GWT for about a week now, but
have found that I must really read the docs carefully
and think globally, when it comes to stuff relating to
'styles' and stuff that is also controlled by .CSS files, etc.

As just one example, I spent a few HOURS debugging/fixing
a problem trying to reduce cell-size of something I was
adding to a VerticalPanel, and nothing would work.
Final fix was that it finally dawned on me, that most
all the 'panel' widgets in GWT are implemented with
table elements, and the fix was to tweak the styles
that I had for table-elements in my projects .CSS file.

Hope this helps your thinking...sorry that I don't have
a more specific answer.

On Dec 7, 9:55 pm, wurenhai <[EMAIL PROTECTED]> wrote:
> Let's read the following code:
> ======CellPanel.java===
>   /**
>    * Sets the height of the cell associated with the given widget,
> related to
>    * the panel as a whole.
>    *
>    * @param w the widget whose cell height is to be set
>    * @param height the cell's height, in CSS units
>    */
>   public void setCellHeight(Widget w, String height) {
>     Element td = DOM.getParent(w.getElement());
>     DOM.setElementProperty(td, "height", height);
>   }
>
>   /**
>    * Sets the horizontal alignment of the given widget within its
> cell.
>    *
>    * @param w the widget whose horizontal alignment is to be set
>    * @param align the widget's horizontal alignment, as defined in
>    *         [EMAIL PROTECTED] HasHorizontalAlignment}.
>    */
>   public void setCellHorizontalAlignment(Widget w,
>       HorizontalAlignmentConstant align) {
>     Element td = getWidgetTd(w);
>     if (td != null) {
>       setCellHorizontalAlignment(td, align);
>     }
>   }
>
>   /**
>    * Sets the vertical alignment of the given widget within its cell.
>    *
>    * @param w the widget whose vertical alignment is to be set
>    * @param align the widget's vertical alignment, as defined in
>    *         [EMAIL PROTECTED] HasVerticalAlignment}.
>    */
>   public void setCellVerticalAlignment(Widget w,
> VerticalAlignmentConstant align) {
>     Element td = getWidgetTd(w);
>     if (td != null) {
>       setCellVerticalAlignment(td, align);
>     }
>   }
>
>   /**
>    * Sets the width of the cell associated with the given widget,
> related to the
>    * panel as a whole.
>    *
>    * @param w the widget whose cell width is to be set
>    * @param width the cell's width, in CSS units
>    */
>   public void setCellWidth(Widget w, String width) {
>     Element td = DOM.getParent(w.getElement());
>     DOM.setElementProperty(td, "width", width);
>   }
>
> ====
> The method setCellSize is defferent from setCellAlign.
> I want to say that, there is a bug use setCellSize:
>     VerticalPanel v = new VerticalPanel();
>     Button b = new Button("Button");
>     v.setCellWidth(b, "100px");
>     v.add(b);
> These codes are normal when i uesed in debug model, but there is a IE
> error after i comlie it. The "td" is null!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
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