[CLOSED] Changing only one cell class in Ext.Net.Container with TableLayout

  1. #1

    [CLOSED] Changing only one cell class in Ext.Net.Container with TableLayout

    Hi,

    What I need to do is change only one cell in Container with TableLayout.

    Ext.Net.Container container = new Ext.Net.Container(){Layout = LayoutType.Table.ToString()};
    
    Ext.Net.Button btn1 = new Ext.Net.Button(){Text="1"};
    
    Ext.Net.Button btn2 = new Ext.Net.Button(){Text="2"};
    
    container.Items.Add(btn1);
    container.Items.Add(btn2);//How to change this parent <td> element?
    Here's image showing what exactly I need to do:
    Click image for larger version. 

Name:	mockup tableLayout.png 
Views:	106 
Size:	4.7 KB 
ID:	5259

    Thanks,
    ViDom
    Last edited by Daniil; Dec 10, 2012 at 1:33 PM. Reason: [CLOSED]
  2. #2
    Hi @ViDom,

    You can put the both Buttons into a Container. Then put this Container into the cell. Them the both Buttons will be in the same cell.
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @ViDom,

    You can put the both Buttons into a Container. Then put this Container into the cell. Them the both Buttons will be in the same cell.
    But I don't want them to be in the same cell. I want to 1 cell be at left of page and second should be at right of page.

    I thought I've make it clear at first place.
  4. #4
    Ok, got it.

    Please clarify are you barred to use a TableLayout?

    It would be an easy task with an HBoxLayout.
  5. #5
    Quote Originally Posted by Daniil View Post
    Ok, got it.

    Please clarify are you barred to use a TableLayout?

    It would be an easy task with an HBoxLayout.
    I could try to change it to HBox but I doesn't sure it'll be easy to rewrite it. Got bad experience with changing layout ;)

    But let's do this :) what property needed to be placed to make it happend with HBox?
  6. #6
    Here is how it can look.

    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 Example</title>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
        <ext:Container runat="server" Layout="HBoxLayout" Width="400">
            <Items>
                <ext:Button runat="server" Text="Button 1" />
                <ext:BoxComponent runat="server" Flex="1" />
                <ext:Button runat="server" Text="Button 2" />
            </Items>
        </ext:Container>
    </body>
    </html>
  7. #7
    Quote Originally Posted by Daniil View Post
    Here is how it can look.

    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 Example</title>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
        <ext:Container runat="server" Layout="HBoxLayout" Width="400">
            <Items>
                <ext:Button runat="server" Text="Button 1" />
                <ext:BoxComponent runat="server" Flex="1" />
                <ext:Button runat="server" Text="Button 2" />
            </Items>
        </ext:Container>
    </body>
    </html>
    Thanks @Daniil that's work great for me :)
    But alone I would never get on this solution for sure:(

    Anyway thread can be close:)
  8. #8
    Please click the "Spaced" Button in this example;)
    https://examples1.ext.net/#/Layout/HBoxLayout/Basic/

Similar Threads

  1. Replies: 1
    Last Post: Jul 10, 2012, 11:16 AM
  2. Replies: 0
    Last Post: May 21, 2012, 2:02 AM
  3. [CLOSED] Container creating box when changing theme.
    By webppl in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Jun 23, 2011, 9:30 AM
  4. [CLOSED] Insert Cell into ext:TableLayout
    By georgek in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 24, 2011, 5:07 PM
  5. [CLOSED] TableLayout adding new cell
    By kenanhancer in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Jan 17, 2011, 10:48 AM

Tags for this Thread

Posting Permissions