[CLOSED] ComboBox height

  1. #1

    [CLOSED] ComboBox height

    I need to customize combobox and set height for it to loos consistent with our application. I'm not using standard triiger, so it will not a problems with trigger resize.
    Last edited by Daniil; Mar 13, 2012 at 5:33 PM. Reason: [CLOSED]
  2. #2
    Hi,

    It's possible via CSS.

    Please set up Cls="my-combo".
    .my-combo .x-form-text {
        height: 100px;
    }
  3. #3
    Tried both Cls and stylespec. Doesn't work
  4. #4
    .my-combo  {
        height: 100px !important;
    }
    Here is the full sample.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                Store store = this.ComboBox1.GetStore();
                store.DataSource = new object[] 
                { 
                    new object[] { "1", "item1" },
                    new object[] { "2", "item2" },
                    new object[] { "3", "item3" }
                };
                store.DataBind();
            }
        }
    </script>
    
    <!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>
    
        <style type="text/css">
            .my-combo  {
                height: 100px !important;
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:ComboBox ID="ComboBox1" runat="server" Cls="my-combo">
                <Store>
                    <ext:Store runat="server">
                        <Reader>
                            <ext:ArrayReader>
                                <Fields>
                                    <ext:RecordField Name="value" />
                                    <ext:RecordField Name="text" />
                                </Fields>
                            </ext:ArrayReader>
                        </Reader>
                    </ext:Store>
                </Store>
            </ext:ComboBox>
        </form>
    </body>
    </html>

Similar Threads

  1. set the height for combobox
    By Dinesh.T in forum 1.x Help
    Replies: 6
    Last Post: Mar 08, 2012, 3:02 PM
  2. Synchronize the height of a combobox-Popup
    By aikar in forum 1.x Help
    Replies: 1
    Last Post: Sep 29, 2011, 8:27 AM
  3. Replies: 1
    Last Post: May 14, 2011, 10:51 AM
  4. [CLOSED] TextField and ComboBox height in TopBar
    By krzak in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 08, 2011, 1:13 PM
  5. [CLOSED] [1.0] MessageBoxConfig textbox height - min height
    By methode in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Apr 07, 2010, 10:12 AM

Posting Permissions