Hi Boris,
There is no top alignment with <tc:cell/>
Instead you can create an empty cell after the box and specify the row size.
This is the piece of code that is modified in the middle cell.
<tc:panel>
<f:facet name="layout">
<tc:gridLayout border="0" rows="30px;*"/>
</f:facet>
<tc:cell>
<tc:box label="Test box">
<f:facet name="layout">
<tc:gridLayout border="0" columns="*;*" />
</f:facet>
<tx:in value="5" required="true" label="Test 1"
tip="test" />
<tx:in value="6" required="true" label="Test 2"
tip="test" />
</tc:box>
</tc:cell>
<tc:cell/>
</tc:panel>
So now the the box will be displayed with a row size of 30px and it will say at
the top of the cell.
As per my exp, i used to keep an empty cell always at the bottom of the
gridLayout, so that there would be no alignment issues
Madan
----- Original Message ----
From: Boris Kovalenko <[EMAIL PROTECTED]>
To: MyFaces Discussion <[email protected]>
Sent: Thursday, 22 March, 2007 4:06:58 PM
Subject: Tobago, how to do aligment?
Hello!
How to do aligments with Tobago? With attached peace of code the
tc:box is rendered in center of cell, but I want it be top aligned. Is
this possible? Am I using layout wrong way?
<f:view
xmlns:f="http://java.sun.com/jsf/core";
xmlns:ui="http://java.sun.com/jsf/facelets";
xmlns:tc="http://myfaces.apache.org/tobago/component";
xmlns:tx="http://myfaces.apache.org/tobago/facelet-extension";>
<tc:page width="800px" height="600px">
<f:facet name="layout">
<tc:gridLayout border="0" margin="10px" columns="*;4*"
rows="100px;*;20px"/>
</f:facet>
<tc:cell spanX="2">
<tc:out value="Header"/>
</tc:cell>
<tc:cell spanY="2">
<tc:out value="Menu"/>
</tc:cell>
<tc:cell>
<tc:panel>
<f:facet name="layout">
<tc:gridLayout border="0" rows="fixed"/>
</f:facet>
<tc:box label="Test box">
<f:facet name="layout">
<tc:gridLayout border="0" columns="1*;1*" />
</f:facet>
<tx:in value="5" required="true" label="Test 1"
tip="test" />
<tx:in value="6" required="true" label="Test 2"
tip="test" />
</tc:box>
</tc:panel>
</tc:cell>
<tc:cell>
<tc:out value="Footer"/>
</tc:cell>
</tc:page>
</f:view>
With respect,
Boris
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/