PDA

View Full Version : [CLOSED] Line separator in Form Fields



Mario
Jan 05, 2015, 1:43 PM
How to make to extend to max width the "line separator" in a panel with Layout set to "FormLayout" ?

The code:



<ext:Panel runat="server" ID="PanelGenerale" Title="Generale" BodyPadding="10" Layout="FormLayout" AutoScroll="true">
<Defaults>
<ext:Parameter Name="LabelWidth" Value="130" Mode="Raw" />
</Defaults>
<Items>
<ext:TextField runat="server" ID="TextFieldGenerale_CodiceUtente" FieldLabel="Codice utente:" ReadOnly="true" />
<ext:Label runat="server" ID="LabelSeparatore1" Html ="<hr>" />
<ext:Checkbox runat="server" ID="CheckBoxGenerale_UtenteAttivo" FieldLabel="Utente attivo:" />
<ext:ComboBox runat="server" ID="ComboBoxGenerale_CodiceTipoUtente" FieldLabel="Tipo utente:" ForceSelection="true" />
<ext:TextField runat="server" ID="TextFieldGenerale_RagioneSociale" FieldLabel="Ragione sociale:" />
<ext:ComboBox runat="server" ID="ComboBoxGenerale_CodiceFormaGiuridica" FieldLabel="Forma giuridica:" ForceSelection="true" />
<ext:TextField runat="server" ID="TextFieldGenerale_Indirizzo" FieldLabel="Indirizzo:" />
<ext:ComboBox runat="server" ID="ComboBoxGenerale_CodiceProvincia" FieldLabel="Provincia:" ForceSelection="true" OnDirectChange="ComboBoxGenerale_CodiceProvincia_Change" />
<ext:ComboBox runat="server" ID="ComboBoxGenerale_NomeComune" FieldLabel="Nome comune:" ForceSelection="true" />
<ext:TextField runat="server" ID="TextFieldGenerale_CAP" FieldLabel="CAP:" />
<ext:TextField runat="server" ID="TextFieldGenerale_PartitaIVA" FieldLabel="Partita IVA:" />
<ext:TextField runat="server" ID="TextFieldGenerale_CodiceFiscale" FieldLabel="Codice fiscale:" />
<ext:TextField runat="server" ID="TextFieldGenerale_Nome" FieldLabel="Nome:" />
<ext:TextField runat="server" ID="TextFieldGenerale_Cognome" FieldLabel="Cognome:" />
<ext:TextField runat="server" ID="TextFieldGenerale_MailPrincipale" FieldLabel="Mail principale:" />
<ext:TextField runat="server" ID="TextFieldGenerale_MailOfferte" FieldLabel="Mail offerte:" />
<ext:TextField runat="server" ID="TextFieldGenerale_PEC" FieldLabel="PEC:" />
<ext:TextField runat="server" ID="TextFieldGenerale_TelefonoPrincipale" FieldLabel="Telefono principale:" />
<ext:TextField runat="server" ID="TextFieldGenerale_TelefonoSecondario" FieldLabel="Telefono secondario:" />
<ext:TextField runat="server" ID="TextFieldGenerale_FAX" FieldLabel="FAX:" />
</Items>
</ext:Panel>


Show image attached....http://forums.ext.net/attachment.php?attachmentid=18221&stc=1

Dimitris
Jan 05, 2015, 2:45 PM
Please read:

http://forums.ext.net/showthread.php?9618-CLOSED-Horizontal-separator-in-form-panel

Mario
Jan 05, 2015, 2:59 PM
@Mimisss....

Your solution not work.
Your solution is for EXT.NET 1.x

Dimitris
Jan 05, 2015, 3:31 PM
Does the following work?



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

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

<html>

<head><title></title>
<style>
.form-header { width: 100%; color: #666; padding: 0px 100% 5px 0px; line-height: 40px; font-weight: bold; border-bottom: 1px solid #d0d0d0; white-space: nowrap; font-size: 11px; }
</style>
</head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Panel runat="server" ID="PanelGenerale" Title="Generale" BodyPadding="10" Layout="FormLayout" AutoScroll="true">
<Defaults>
<ext:Parameter Name="LabelWidth" Value="130" Mode="Raw" />
</Defaults>
<Items>
<ext:TextField runat="server" ID="TextFieldGenerale_CodiceUtente" FieldLabel="Codice utente:" ReadOnly="true" />
<ext:Label ID="Label1" runat="server" Text="" HideLabel="true" Cls="form-header" />
<ext:Checkbox runat="server" ID="CheckBoxGenerale_UtenteAttivo" FieldLabel="Utente attivo:" />
<ext:ComboBox runat="server" ID="ComboBoxGenerale_CodiceTipoUtente" FieldLabel="Tipo utente:" ForceSelection="true" />
<ext:TextField runat="server" ID="TextFieldGenerale_RagioneSociale" FieldLabel="Ragione sociale:" />
<ext:ComboBox runat="server" ID="ComboBoxGenerale_CodiceFormaGiuridica" FieldLabel="Forma giuridica:" ForceSelection="true" />
<ext:TextField runat="server" ID="TextFieldGenerale_Indirizzo" FieldLabel="Indirizzo:" />
<ext:ComboBox runat="server" ID="ComboBoxGenerale_CodiceProvincia" FieldLabel="Provincia:" ForceSelection="true"/>
<ext:ComboBox runat="server" ID="ComboBoxGenerale_NomeComune" FieldLabel="Nome comune:" ForceSelection="true" />
<ext:TextField runat="server" ID="TextFieldGenerale_CAP" FieldLabel="CAP:" />
<ext:TextField runat="server" ID="TextFieldGenerale_PartitaIVA" FieldLabel="Partita IVA:" />
<ext:TextField runat="server" ID="TextFieldGenerale_CodiceFiscale" FieldLabel="Codice fiscale:" />
<ext:TextField runat="server" ID="TextFieldGenerale_Nome" FieldLabel="Nome:" />
<ext:TextField runat="server" ID="TextFieldGenerale_Cognome" FieldLabel="Cognome:" />
<ext:TextField runat="server" ID="TextFieldGenerale_MailPrincipale" FieldLabel="Mail principale:" />
<ext:TextField runat="server" ID="TextFieldGenerale_MailOfferte" FieldLabel="Mail offerte:" />
<ext:TextField runat="server" ID="TextFieldGenerale_PEC" FieldLabel="PEC:" />
<ext:TextField runat="server" ID="TextFieldGenerale_TelefonoPrincipale" FieldLabel="Telefono principale:" />
<ext:TextField runat="server" ID="TextFieldGenerale_TelefonoSecondario" FieldLabel="Telefono secondario:" />
<ext:TextField runat="server" ID="TextFieldGenerale_FAX" FieldLabel="FAX:" />
</Items>
</ext:Panel>
</form>
</body>
</html>

Mario
Jan 05, 2015, 4:06 PM
Not work.... :(

Dimitris
Jan 05, 2015, 5:02 PM
Please change the panel declaration to:



<ext:FormPanel runat="server" ID="PanelGenerale" Title="Generale" BodyPadding="10" AutoScroll="true">

RaphaelSaldanha
Jan 05, 2015, 6:43 PM
Mario, please set FormPanel's Layout="AnchorLayout" and DefaultAnchor="100%", as shown below:

18251



<!DOCTYPE html>
<html>
<head runat="server">
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:Panel Layout="AnchorLayout" DefaultAnchor="100%" runat="server" ID="PanelGenerale" Title="Generale" BodyPadding="10" AutoScroll="true">
<Defaults>
<ext:Parameter Name="LabelWidth" Value="130" Mode="Raw" />
</Defaults>
<Items>
<ext:TextField runat="server" ID="TextFieldGenerale_CodiceUtente" FieldLabel="Codice utente:" ReadOnly="true" />
<ext:Label runat="server" ID="LabelSeparatore1" Html="<hr>" />
<ext:Checkbox runat="server" ID="CheckBoxGenerale_UtenteAttivo" FieldLabel="Utente attivo:" />
<ext:ComboBox runat="server" ID="ComboBoxGenerale_CodiceTipoUtente" FieldLabel="Tipo utente:" ForceSelection="true" />
<ext:TextField runat="server" ID="TextFieldGenerale_RagioneSociale" FieldLabel="Ragione sociale:" />
<ext:ComboBox runat="server" ID="ComboBoxGenerale_CodiceFormaGiuridica" FieldLabel="Forma giuridica:" ForceSelection="true" />
<ext:TextField runat="server" ID="TextFieldGenerale_Indirizzo" FieldLabel="Indirizzo:" />
<ext:ComboBox runat="server" ID="ComboBoxGenerale_CodiceProvincia" FieldLabel="Provincia:" ForceSelection="true" />
<ext:ComboBox runat="server" ID="ComboBoxGenerale_NomeComune" FieldLabel="Nome comune:" ForceSelection="true" />
<ext:TextField runat="server" ID="TextFieldGenerale_CAP" FieldLabel="CAP:" />
<ext:TextField runat="server" ID="TextFieldGenerale_PartitaIVA" FieldLabel="Partita IVA:" />
<ext:TextField runat="server" ID="TextFieldGenerale_CodiceFiscale" FieldLabel="Codice fiscale:" />
<ext:TextField runat="server" ID="TextFieldGenerale_Nome" FieldLabel="Nome:" />
<ext:TextField runat="server" ID="TextFieldGenerale_Cognome" FieldLabel="Cognome:" />
<ext:TextField runat="server" ID="TextFieldGenerale_MailPrincipale" FieldLabel="Mail principale:" />
<ext:TextField runat="server" ID="TextFieldGenerale_MailOfferte" FieldLabel="Mail offerte:" />
<ext:TextField runat="server" ID="TextFieldGenerale_PEC" FieldLabel="PEC:" />
<ext:TextField runat="server" ID="TextFieldGenerale_TelefonoPrincipale" FieldLabel="Telefono principale:" />
<ext:TextField runat="server" ID="TextFieldGenerale_TelefonoSecondario" FieldLabel="Telefono secondario:" />
<ext:TextField runat="server" ID="TextFieldGenerale_FAX" FieldLabel="FAX:" />
</Items>
</ext:Panel>
</form>
</body>
</html>

RaphaelSaldanha
Jan 05, 2015, 6:53 PM
Mario, note that on my example, ComboBoxGenerale_CodiceProvincia's OnDirectChange is absent.

Let us know whether you need further assistance.

RaphaelSaldanha
Jan 14, 2015, 11:48 AM
Mario, can this thread be marked as closed?

Mario
Jan 16, 2015, 8:59 AM
Excuse me RaphaelSaldanha,

I'm working with 2.5.x version of EXT.NET for license problem...
In this moment I can not try yours code...

But... thanks you very much!

Mario

Daniil
Jan 16, 2015, 11:23 AM
In this moment I can not try yours code...

Please clarify does it not work in v2.x? Is the problem still actual?

P.S. Please ask Ext.NET 2.x related questions on the 2.x Premium Help forum.

Mario
Jan 16, 2015, 12:37 PM
Sorry everyone... I did confusion between the Forum.

The solution of RaphaelSaldanha on 2.x works well!

I have not verified if the solution of RaphaelSaldanha works also on 3.x