Div, FormPanel

  1. #1

    Div, FormPanel

    Hey, I having a hard time using a formpanel, well .. the width of my formpanel is 900, en is on a div, the problem
    is when I minimize the browser the formpanel doesnt, exist a way to the formpanel no stays in 900 width when I minimize ??
  2. #2
    Hi @rookie,

    Please provide us with a sample to reproduce.
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @rookie,

    Please provide us with a sample to reproduce.
    this is the stylesheet:
    body 
    {
        margin: 0px 0px 0px 0px;
        background-color:Blue;
        background-repeat: repeat; 
    }
    
    .page
    {
        height:100%;
        width: 100%;
        
        background-color:Aqua;
        margin: 0px 0px 0px 0px;
        border: 0px solid #C0C0C0;
    }
    
    .header
    {
        padding: 0px 0px 0px 0px;
        margin: 0px 0px 0px 0px;
        position: relative;
        width: 100%;
        height: 38px;
        
        background-color: White;
        background-repeat: repeat;
        border-color:Fuchsia;
        border-width:medium;
    }
    
    .main
    {
        
        height:100%;
        width:100%;
        background-color:Blue;
        background-repeat: repeat; 
    }
    and this is the example
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager runat="server">
        </ext:ResourceManager>
        <div class="page">
            <div class= "header">
                INICIO
            </div>
            <div class="main">
                <ext:GridPanel 
                    ID="gpAlumnos" 
                    runat="server" 
                    Title="Alumnos" 
                    StripeRows="true"
                    TrackMouseOver="true" 
                    EnableViewState="true" 
                    Width="900" 
                    Height="350" 
                    AutoScroll="true" Frame="true">
                   
                    <ColumnModel>
                        <Columns>
                            
                            <ext:Column ID="Column1" runat="server"  Text="Cuenta">
                            </ext:Column>
                            <ext:Column ID="Column2" runat="server"  Text="Nombre" Width = "300">
                            </ext:Column>
                            <ext:Column ID="Column3" runat="server" Text="Telefono">
                               
                            </ext:Column>
                            <ext:Column ID="Column4" runat="server"  Text="Carrera" Width="200">
                                
                            </ext:Column>
                            <ext:Column ID="Column5" runat="server" Text="Correo">
                            </ext:Column>
                            <ext:ImageCommandColumn ID="Detalles" runat="server" Width="95" Text="Detalles/Editar">
                                <Commands>
                                    <ext:ImageCommand Icon="NoteEdit">
                                        <ToolTip Text="Edit" />
                                    </ext:ImageCommand>
                                </Commands>
                            </ext:ImageCommandColumn>    
                        </Columns>
                    </ColumnModel>
                </ext:GridPanel>
            </div>
        </div>
        </form>
    </body>

    So if the browser is maximized looks fine! but if I am minimized the size of the browser, you can see the grid stays at its original size, you can see it if you look the div "header" is shorter than the "main" header, so there is a way to when minimize the browser the grid chance its width ? because if I changed the width to smaller number like 300 or 400 works fine if I minimized, but I want to figure out how to make work with this width
  4. #4
    Well, divs don't listen a window resize event to be resized.

    I would suggest use to use a Viewport with a BorderLayout.
    https://examples2.ext.net/#/Viewport...ilt_in_Markup/

    You can put a header into a North region, and the GridPanel into a Center region.

    Viewport must be a top level container within a <body> (or a <form>).

    Then it will be automatically resized.

Similar Threads

  1. how to add another column in FormPanel
    By extNewBee in forum 1.x Help
    Replies: 2
    Last Post: Jun 06, 2012, 8:56 PM
  2. Can i use my own FormPanel in CalendarPanel
    By tonyls in forum 1.x Help
    Replies: 0
    Last Post: Mar 23, 2012, 4:57 AM
  3. Replies: 0
    Last Post: Nov 17, 2011, 10:53 AM
  4. how to override in formpanel ?
    By jhenriquecosta in forum 1.x Help
    Replies: 1
    Last Post: Feb 08, 2010, 11:04 AM
  5. formpanel update
    By Richardt in forum 1.x Help
    Replies: 9
    Last Post: Jan 21, 2010, 6:25 AM

Posting Permissions