Combobox List Items Class

  1. #1

    Combobox List Items Class

    Ok - this may be a dumb question - but what property do I need to set to set a class to the Combobox list items - without a template - just a standard bound CB
  2. #2

    RE: Combobox List Items Class

    Hi,

    Please see the following sample
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" 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 id="Head1" runat="server">
        <title></title>
        
        <style type="text/css">
            .x-my-list .x-combo-list-inner
            {
                color:Red;
            }
        </style>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ScriptManager ID="ScriptManager1" runat="server"/>
            
            <ext:ComboBox runat="server" ListClass="x-my-list">
                <Items>
                    <ext:ListItem Text="1" />
                    <ext:ListItem Text="2" />
                    <ext:ListItem Text="3" />
                    <ext:ListItem Text="4" />
                    <ext:ListItem Text="5" />
                </Items>
            </ext:ComboBox>
        </form>
    </body>
    </html>
  3. #3

    RE: Combobox List Items Class

    Thanks - I can now change the color - but not the font (size, family, etc.)
  4. #4

    RE: Combobox List Items Class

    Ok,

    then please use 'x-combo-list-item' instead 'x-combo-list-inner'

    <style type="text/css">
            .x-my-list .x-combo-list-item
            {
                color:Red;
                font-size: 20px;    
            }
        </style>

  5. #5

    RE: Combobox List Items Class

    Perfect - thanks!!!!!!
  6. #6
    Quote Originally Posted by Tbaseflug View Post
    Perfect - thanks!!!!!!
    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" 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 id="Head1" runat="server">
        <title></title>
         
        <style type="text/css">
            .x-my-list .x-combo-list-inner
            {
                color:Red;
               width:100%; 
               width:auto;
            }
        </style>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ScriptManager ID="ScriptManager1" runat="server"/>
             
            <ext:ComboBox runat="server" ListClass="x-my-list"  Width="250px">
                <Items>
                    <ext:ListItem Text="1" />
                    <ext:ListItem Text="2" />
                    <ext:ListItem Text="3" />
                    <ext:ListItem Text="4" />
                    <ext:ListItem Text="5" />
                </Items>
            </ext:ComboBox>
        </form>
    </body>
    </html>
    Width is not changed it remain to the combox Width "250px".. how can i change the width of the combo to auto or 100% or to %?
    Last edited by Daniil; Dec 10, 2010 at 7:24 AM. Reason: Please use [CODE] tags
  7. #7
    Hi,

    Please use [CODE ] tags, see
    http://forums.ext.net/showthread.php...ing-New-Topics

    I suggest to continue discussion here
    http://forums.ext.net/showthread.php...-to-List-width
    Last edited by geoffrey.mcgill; Feb 20, 2011 at 12:11 PM.

Similar Threads

  1. Replies: 0
    Last Post: Jun 08, 2012, 11:49 AM
  2. Replies: 1
    Last Post: Apr 30, 2012, 7:34 AM
  3. combobox list items not comming in left align
    By Nagaraju in forum 1.x Help
    Replies: 3
    Last Post: Dec 15, 2011, 3:27 PM
  4. [CLOSED] Clear combobox list items in the code behind
    By Marcelo in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: May 24, 2011, 3:17 PM
  5. Combobox loses its list of items
    By PeterParsonage in forum 1.x Help
    Replies: 1
    Last Post: Feb 10, 2011, 10:46 PM

Posting Permissions