Hi,
have a problem with my CSS sizing of my GWT Elements. A Very Short
Example:
*CSS*
.codingArea{
width:100%;
height:100%;
background-color:red;
}
now i have a DialogBox with a fix Size, where i add 2 Widgets,
(ListBox and Textarea) now the Textarea should use all Space:
*GWT*
DialogBox dialog=new DialogBox();
VerticalPanel boxPanel=new VerticalPanel();
boxPanel.setSize("800px", "600px");
ListBox lbCategory=new ListBox();
TextArea taCode=new TextArea();
taCode.setStyleName("codingArea");
boxPanel.add(lbCategory);
boxPanel.add(taCode);
dialog.setWidget(boxPanel);
dialog.show();
The wanted Effect should be clear: DialogBox with 800x600px, on top a
ListBox (Space using as needed), followed by a textarea which using
all space. But in fact the Textarea using just ~70%. I have analyzed
the generated HTML Code and think i have found the Problem but no
pretty solution. The above Code ends up in a table:
<tr>
<td align="left" style="vertical-align: top;">
<select class="gwt-ListBox" tabindex="0" title="Category">
</select>
</td>
</tr>
<tr>
<td align="left" style="vertical-align: top;">
<textarea class="codingArea" tabindex="0" title="Code Area"/>
</td>
</tr>
here is my CSS Class bound to the textarea, and THAT is the problem,
the Textarea uses 100% of his space, but the parent Node (the TD
Element) restricted him to uses the expected Space, editing the TD
Element of the Textarea such as:
<td align="left" style="vertical-align: top;" style="width:100%;height:
100%">
<textarea tabindex="0" title="Code Area" class="codingArea"/>
</td>
has the effect as expected.
Now the Question ( :) ):
How can i realize this Sizing of my Components over CSS only as i
exptect?
My "hack" isn't very usefull in a huge project:
>> Setting the "Parent" Cell of the Element a own Size:
boxPanel.setCellHeight(taCode, "100%");
boxPanel.setCellWidth(taCode, "100%");
Ends up in a maximzed Textarea as needed, but isnt't very pretty i
think...
thx for any idea!
D
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---