PDA

View Full Version : [CLOSED] Ext net v2 Beta Release: control positions are changed in ext:FieldSet



supera
Mar 23, 2012, 1:39 PM
Hi

I believe that is anything wrong with the ext:Fieldset... My controls are disorganized in Beta version.
I use the layout 'AbsoluteLayout' in Fieldset. In DP1, my controls are positioned exactly in x and y position with this layout. But in beta version, the controls position are incresed in y...

There are a little diference too visualizing the page in IE9 and FireFox/Chrome.



<%@ Page Language="vb" %>
<%@ 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></title>
</head>
<body>
<ext:ResourceManager ID="resManagerDividas" runat="server" Locale="pt-BR" />
<form id="form1" runat="server">
<ext:FieldSet runat="server" ID="fsSolicitacao" Title="Solicitação de Cotação de Preços" Layout="AbsoluteLayout" X="10" Y="70" Height="75px" Width="470px">
<Items>
<ext:Label runat="server" ID="lblCotacaoRequisicaoNumero" Text="Requisição:" X="0" Y="5" Width="70px" StyleSpec="text-align:right"/>
<ext:Label runat="server" ID="lblCotacaoDescricao" Text="Descrição:" X="200" Y="5" Width="70px" StyleSpec="text-align:right"/>
<ext:Label runat="server" ID="lblCotacaoIDObra_Nome" Text="Obra:" X="0" Y="20" Width="70px" StyleSpec="text-align:right"/>
<ext:Label runat="server" ID="lblCotacaoIDUsuarioResponsavel_Nome" Text="Responsável:" X="0" Y="35" Width="70px" StyleSpec="text-align:right"/>
<ext:Label runat="server" ID="lblCotacaoIDUsuarioResponsavel_Email" Text="E-mail:" X="200" Y="35" Width="70px" StyleSpec="text-align:right"/>
<ext:DisplayField runat="server" ID="txtCotacaoRequisicaoNumero" X="75" Y="5" Width="150px" text="" />
<ext:DisplayField runat="server" ID="txtCotacaoDescricao" X="275" Y="5" Width="350px" text="" />
<ext:DisplayField runat="server" ID="txtCotacaoIDObra_Nome" X="75" Y="20" Width="150px" text="" />
<ext:DisplayField runat="server" ID="txtCotacaoIDUsuarioResponsavel_Nome" X="75" Y="35" Width="150px" text="" />
<ext:DisplayField runat="server" ID="txtCotacaoIDUsuarioResponsavel_Email" X="275" Y="35" Width="150px" text="" />
</Items>
</ext:FieldSet>
</form>
</body>
</html>

Daniil
Mar 23, 2012, 3:34 PM
Hi,

To clarify the issue.

Are you expecting the Label just under the Title without the gap, right?

Example

<%@ 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 v2 Example</title>
</head>
<body>
<ext:ResourceManager runat="server" />
<ext:FieldSet runat="server" Title="FieldSet">
<Items>
<ext:Label runat="server" Text="Label" />
</Items>
</ext:FieldSet>
</body>
</html>

supera
Mar 23, 2012, 7:22 PM
Hi Daniil!

Well... In DP1, when I set the 'layout' property of Fieldset to 'AbsoluteLayout', the position of controls are exactly that I set in 'x' and 'y' properties of control...

Now, in Beta version, there are a space between the top corner of Fieldset and the 'y' position of controls...

And, In IE9 and Firefox, there are diferences to 'y' positions...

supera
Mar 23, 2012, 7:42 PM
Clarifying

When I set the 'layout' property to 'AbsoluteLayout' in FieldSet, There should be no spaces 1 and 2, as 'x' and 'y' property are zero.

3993




<%@ Page Language="vb" %>
<%@ 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></title>
</head>
<body>
<ext:ResourceManager ID="resManagerDividas" runat="server" Locale="pt-BR" />
<form id="form1" runat="server">
<ext:FieldSet runat="server" ID="fsSolicitacao" Title="Solicitação de Cotação de Preços" Layout="AbsoluteLayout" Height="105px" Width="470px">
<Defaults>
<ext:Parameter Name="LabelAlign" Value="top" Mode="Value" />
</Defaults>
<Items>
<ext:TextField runat="server" ID="txt1" FieldLabel="Label" x="0" Y="0" Width="120"/>
</Items>
</ext:FieldSet>
</form>
</body>
</html>

Daniil
Mar 23, 2012, 8:17 PM
Well, you can correct it setting your custom padding.

Example

<%@ 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 v2 Example</title>

<style type="text/css">
.my-fieldset {
padding-top: 0px;
padding-left: 0px;
}

.x-ie .x-fieldset .x-fieldset-body {
padding-top: 0px;
}
</style>
</head>
<body>
<ext:ResourceManager runat="server" />
<ext:FieldSet
runat="server"
Title="FieldSet"
Height="100"
Width="200"
Cls="my-fieldset"
Layout="AbsoluteLayout">
<Items>
<ext:Label runat="server" Text="Label" X="0" Y="0" />
</Items>
</ext:FieldSet>
</body>
</html>

supera
Mar 23, 2012, 9:44 PM
Hi Daniil!

This is a bug? If yes, I prefer to wait to be solved.
I use fieldset throughout my application, in some places with the FitLayout AbsoluteLayout and others.
If I use your suggestion, where I use the layout as 'FitLayout', will not be wrong?

Daniil
Mar 26, 2012, 5:31 AM
This is a bug? If yes, I prefer to wait to be solved.


I'm not 100% sure, but, I think, this is rather a part of ExtJS styling. I would suggest to use the suggested work-around for now.



I use fieldset throughout my application, in some places with the FitLayout AbsoluteLayout and others.
If I use your suggestion, where I use the layout as 'FitLayout', will not be wrong?

I think it should work for FieldSet independataly from its layout.

supera
Mar 26, 2012, 12:35 PM
Ok... I follow your suggestion!

Thanks Daniil!

Daniil
Mar 26, 2012, 2:12 PM
I'm not 100% sure, but, I think, this is rather a part of ExtJS styling. I would suggest to use the suggested work-around for now.

Be the way, I also can't guarantee it won't be changed in the next release.

supera
Mar 26, 2012, 2:23 PM
No Problem... great framework, very little problems...

Daniil
Mar 26, 2012, 2:27 PM
Thanks for the feedback!

I'm marking the thread as closed.

Please feel free to update the thread (or start a new one) if you will face any problems in the future.

Daniil
Mar 26, 2012, 4:26 PM
We decided to add "padding-top" rules to SVN.

So, after update you can leave only:

<style type="text/css">
.my-fieldset {
padding-left: 0px;
}
</style>
instead of

<style type="text/css">
.my-fieldset {
padding-top: 0px;
padding-left: 0px;
}

.x-ie .x-fieldset .x-fieldset-body {
padding-top: 0px;
}
</style>