It's not a bug, it's just how HTML works.
Put a border on the vp (vp.setBorder(1)) and give the labels a background
colour and you will see what you are doing more easily.

The VP is a table, and if you have two TDs and give the table a height, each
TD will be half that height (if the content is the same. Therefore your
label in the second cell will be at the top of the second cell, but still be
half way down the VP

You are probably using the wrong widget. Use a FlowPanel, give it a height
if you want, and put the labels in that if you want them together with space
underneath.

Ian

http://examples.roughian.com


2009/6/30 Joseph Arceneaux <joe.arcene...@gmail.com>

> Thanks much, but if you meant:
>     panel.setCellHeight (label, "100%");
>
> that had 0 effect.
>
> I have noticed that if I change my panel to not fill its container (it goes
> into a dockpanel), then it's only the size of its two Label children, and
> hence the labels are contiguous.  So I'm pretty sure I can get this by
> placing the two Labels into another, unsized Vertical Panel and then placing
> that panel into my original one.
>
> But it seems to me that it should be much simpler - like setting vertical
> alignment to TOP, like it says in the documentation.  This seems to me like
> a bug in either the doc or the functionality...
>
> Joe
>
>
> On Mon, Jun 29, 2009 at 12:29 PM, Ian Bambury <ianbamb...@gmail.com>wrote:
>
>> Set the cell height to 100%
>> Ian
>>
>> http://examples.roughian.com
>>
>>
>> 2009/6/29 Joseph Arceneaux <joe.arcene...@gmail.com>
>>
>>> This placement within a panel is very confusing.  I am trying to stack
>>> some labels contiguously in a vertical panel, starting at the top.  But the
>>> panel places the first label at the very top, and then the second label in
>>> the very middle.  I've tried changing the CSS style, and also various
>>> permutations of the following Java:
>>>         panel.setVerticalAlignment (HasVerticalAlignment.ALIGN_TOP);
>>>         panel.add (label_1);
>>>         panel.setCellVerticalAlignment (label_1,
>>> HasVerticalAlignment.ALIGN_TOP);
>>>         panel.add (label_2);
>>>         panel.setCellVerticalAlignment (offset,
>>> HasVerticalAlignment.ALIGN_TOP);
>>>
>>> but nothing seems to change this behavior.
>>>
>>> Any suggestions?
>>>
>>> Thanks,
>>> Joe
>>>
>>> On Mon, Jun 29, 2009 at 5:09 AM, Ian Bambury <ianbamb...@gmail.com>wrote:
>>>
>>>> vertical-align: bottom !important;
>>>> ?
>>>>
>>>> Ian
>>>>
>>>> http://examples.roughian.com
>>>>
>>>>
>>>> 2009/6/29 alex.d <alex.dukhov...@googlemail.com>
>>>>
>>>>
>>>>> panel.setCellVerticalAlignment(textbox,
>>>>> HasVerticalAlignment.ALIGN_BOTTOM);
>>>>>
>>>>> On 27 Jun., 21:59, max3000 <maxime.lar...@gmail.com> wrote:
>>>>> > Hi,
>>>>> >
>>>>> > I'm trying to align an image and a textbox in a HorizontalPanel using
>>>>> > only CSS. I want the textbox to be aligned at the bottom.
>>>>> >
>>>>> > Doing the following works:
>>>>> > panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
>>>>> >
>>>>> > However, no amount of CSS at the panel level works. It figures
>>>>> because
>>>>> > GWT inserts an automatic "vertical-align: top", like this:
>>>>> >
>>>>> > <td align="left" style="vertical-align: top;">
>>>>> > <img class="search_logo" src="/resources/logo.jpg"/>
>>>>> > </td>
>>>>> >
>>>>> > Why is that so? Am I missing something or is there no way to align
>>>>> > cell content at the bottom using CSS?
>>>>> >
>>>>> > Thanks,
>>>>> > Max
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to