PDA

View Full Version : [CLOSED] FieldSet width problem



ddeniz
Mar 12, 2014, 11:12 AM
Hi,

i can't set fieldset width 100%. i tried set filedset width and anchor property but it doesn't work.

how can i set filedset width 100% or autowidth?

Her is my codes.


<ext:FormPanel ID="Panel1" runat="server" Title="ALINAN FATURA (SİPARİŞLİ)" Frame="true"
BodyPadding="10" Resizable="false" Anchor="100%">
<FieldDefaults LabelWidth="110" LabelStyle="color:green;padding-left:4px;" />

<Items>
<ext:Container ID="Container1" runat="server" Layout="VBoxLayout" MarginSpec="0 0 10">
<Items>


<ext:FieldSet ID="fsSecilenKalemler" runat="server" Flex="1" Title="Se?ilen Sipariş Kalemleri"
Layout="AnchorLayout" Width="600" > <--------------
<Defaults>
<ext:Parameter Name="HideEmptyLabel" Value="false" Mode="Raw" />
</Defaults>
<Items>

Daniil
Mar 12, 2014, 12:40 PM
Hi @ddeniz,

Welcome to the Ext.NET forums!

I tried to replicate the problem, but I could not.

The FieldSet in the example below appears to take all the width without any additional settings.

Example

<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!DOCTYPE html>
<html>
<head runat="server">
<title>Ext.NET v2 Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />

<ext:FormPanel runat="server" Width="400" Height="400">
<Items>
<ext:Container runat="server">
<Items>
<ext:FieldSet runat="server" Title="FieldSet">
<Items>
<ext:TextField runat="server" />
</Items>
</ext:FieldSet>
</Items>
</ext:Container>
</Items>
</ext:FormPanel>
</form>
</body>
</html>

ddeniz
Mar 12, 2014, 3:57 PM
Thanks for your answer.

Fieldset is a strange control :)

my formpanel control's width type anchor and it's value 100% (it's works)
like this;


<ext:FormPanel ID="Panel1" runat="server" Frame="true" BodyPadding="10" Resizable="false" Anchor="100%">

The formpanel has a fieldset control and i deleted fieldset's width and anchor properties also fieldset control has a gridpanel control.
the gridpanel hasn't width or anchor property and it's dosent work thus (fieldset and gridpanel dosent show where i run my project)

i think, filedset controls dosent inherit width value from formpanel,it's width value maximum width member of fieldset.

Daniil
Mar 12, 2014, 6:01 PM
Anchor="100%"

This setting is used by an AnchorLayout only.
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.layout.container.Anchor-cfg-anchor

So, it a parent container doesn't have an AnchorLayout, then an Anchor setting doesn't produce any effect.


i think, filedset controls dosent inherit width value from formpanel,it's width value maximum width member of fieldset.

Not sure what exactly you mean, but the FieldSet in my example occupies all the available width.