-
1 Attachment(s)
[CLOSED] Layout Advice
Hi, I'm trying to achieve a similar layout to that of a typical email client. I found it relatively straight forward to create the From,To, Subject, Body style layout but I'm really struggling to understand how to align the 'Sent' label to the right hand side. I've attached a png highlighting my layout goals and I've boxed the problem field in red.
If someone could help me out with this I would be really grateful.
Thanks,
Gav
-
Hi,
Here is the one of possible solutions.
Example
Code:
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Ext.Net Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:Container
runat="server"
Height="100"
Layout="FormLayout"
LabelWidth="80">
<Items>
<ext:CompositeField runat="server" FieldLabel="From">
<Items>
<ext:DisplayField runat="server" Text="some sender" Flex="1"/>
<ext:DisplayField runat="server" Text="Sent:" Width="40" />
<ext:DisplayField runat="server" Text="some date" Width="80" />
</Items>
</ext:CompositeField>
<ext:DisplayField runat="server" FieldLabel="To" Text="aome destination" />
<ext:DisplayField runat="server" FieldLabel="Cc" />
<ext:DisplayField runat="server" FieldLabel="Subject" Text="Some subject" />
</Items>
</ext:Container>
</form>
</body>
</html>
-
Hi Daniil, thanks. That appears to be a working solution.
Gav
-
Out of interest, is DisplayField as new component? I've never noticed it before and there aren't any demos in the Example Explorer.
-
It's rather old control, appeared in 1.0.
Here is the ExtJS prototype:
http://dev.sencha.com/deploy/ext-3.3.1/docs/?class=Ext.form.DisplayField
Regarding examples explorer: well, it's so simple control (like <ext:Label>) that I can't see how the example can look:)
But somethimes this control appears in other examples.