[CLOSED] Button inside compositefield

  1. #1

    [CLOSED] Button inside compositefield

    Good morning,

    I cant get button to work inside a composite field.

    Bellow is a code to reproduce.

    Thanks

    <%@ 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>Button Control Variations - Ext.NET Examples</title>
    </head>
    <body>
        <ext:ResourceManager runat="server" DirectEventUrl="default.aspx" />
        <h2>
            10. Flat Button</h2>
        <p>
            Button 1</p>
        <ext:Button runat="server" Text="FlatButton" Icon="Accept" Flat="true" />
        <p>
            Button 2 - not showing</p>
        <ext:CompositeField runat="server">
            <Items>
                <ext:Button runat="server" Text="FlatButton" Icon="Accept" Flat="true" />
            </Items>
        </ext:CompositeField>
        <p>
            Button 3 - flat not working</p>
        <ext:Container runat="server">
            <Items>
                <ext:CompositeField runat="server">
                    <Items>
                        <ext:Button runat="server" Text="FlatButton" Icon="Accept" Flat="true" />
                    </Items>
                </ext:CompositeField>
            </Items>
        </ext:Container>
    </body>
    </html>
    Last edited by geoffrey.mcgill; May 04, 2011 at 8:20 PM. Reason: [CLOSED]
  2. #2
    Hi,

    In general, CompositeField requires width, for example, fixed or from its container. So, if you would set fixed Width for CompositeField in the "Button 2 - not showing" you will see that button.

    Regarding the .Flat, please follow
    http://forums.ext.net/showthread.php?13358
  3. #3
    Also please clarify ado you really need to use Button inside CompositeField. If no, you could use a container with HBoxLayout instead of CompositeField.
  4. #4
    I use compositefield because I am used with this component. I dont have much experience with HBoXLayout.

    I setted a fixed with in compositefield, and still flat doenst work. I also couldnt manage to make the button show in the hboxlayout. I am missing something?

    Code updated:

    <%@ 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>Button Control Variations - Ext.NET Examples</title>
    </head>
    <body>
        <ext:ResourceManager runat="server" DirectEventUrl="default.aspx" />
        <h2>
            10. Flat Button</h2>
        <p>
            Button 1</p>
        <ext:Button runat="server" Text="FlatButton" Icon="Accept" Flat="true" />
        <p>
            Button 2 - not showing</p>
        <ext:CompositeField Width="100" runat="server">
            <Items>
                <ext:Button runat="server" Text="FlatButton" Icon="Accept" Flat="true" />
            </Items>
        </ext:CompositeField>
        <p>
            Button 3 - flat not working</p>
        <ext:Container Width="100" Layout="HBoxLayout" runat="server">
            <Items>
                <ext:Button runat="server" Text="FlatButton" Icon="Accept" Flat="true" />
            </Items>
        </ext:Container>
    </body>
    </html>
  5. #5
    I setted a fixed with in compositefield, and still flat doenst work.
    Did you investigate this thread?
    Quote Originally Posted by Daniil View Post
    Regarding the .Flat, please follow
    http://forums.ext.net/showthread.php?13358
    Example
    <ext:Container 
        runat="server" 
        Width="100" 
        Cls="x-toolbar x-inline-toolbar" 
        Layout="HBoxLayout">
        <Items>
            <ext:Button runat="server" Text="FlatButton" Icon="Accept" />
        </Items>
    </ext:Container>
    I use compositefield because I am used with this component. I dont have much experience with HBoXLayout.
    In general, CompositeField is to use in context of FormPanel, it's a container with HBoxLayout that provides some advantages like validation and other 'form things'.
  6. #6
    Please, mark as solved.

Similar Threads

  1. Replies: 8
    Last Post: Sep 28, 2012, 2:42 PM
  2. [CLOSED] Flat-Button in CompositeField not displayed properly
    By pschojer in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 29, 2011, 11:47 AM
  3. [CLOSED] Button alignment problem in CompositeField
    By tansu in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 11, 2011, 8:32 PM
  4. Replies: 0
    Last Post: Jul 09, 2010, 4:19 PM
  5. [CLOSED] [1.0] Button in CompositeField not in Item collection
    By rcaunt in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Apr 28, 2010, 3:18 PM

Posting Permissions