[CLOSED] Change custom icon to trigger of ComboBox

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] Change custom icon to trigger of ComboBox

    Hi Team Ext.Net I Want to change the icon to trigger of ComboBox, I see the property "TriggerCls", but I don't see anything efect, How Can I to do it?

    Regards.
    Last edited by Baidaly; Jul 26, 2013 at 9:35 PM. Reason: [CLOSED]
  2. #2
    Hi @osef,

    Here is an example.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    
        <style>
            .my-icon {
                background-image: url(resources/images/test.png);
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            
            <ext:ComboBox runat="server" TriggerCls="my-icon" />
        </form>
    </body>
    </html>
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @osef,

    Here is an example.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    
        <style>
            .my-icon {
                background-image: url(resources/images/test.png);
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            
            <ext:ComboBox runat="server" TriggerCls="my-icon" />
        </form>
    </body>
    </html>
    Hi Daniil, I have a page in white, when I put this code.
  4. #4
    What Ext.NET version are you using?
  5. #5
    Quote Originally Posted by Daniil View Post
    What Ext.NET version are you using?
    I'm using Ext.Net 2.0
  6. #6
    Please see the following sample
    http://examples2.ext.net/#/Form/Trig...d/Custom_Icon/

    Please note that image for trigger is complex (it should contain 5 states for button), here is an example for button
    http://examples2.ext.net/Examples/Fo...om-trigger.gif
    Vladimir Shcheglov
    Sr. Developer
  7. #7
    Quote Originally Posted by Vladimir View Post
    Please see the following sample
    http://examples2.ext.net/#/Form/Trig...d/Custom_Icon/

    Please note that image for trigger is complex (it should contain 5 states for button), here is an example for button
    http://examples2.ext.net/Examples/Fo...om-trigger.gif
    Vladimir I need the control ComboBox has this trigger, in the example is the control TriggerField, thank you.
  8. #8
    Hello!

    Try the following:

    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
     
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
     
        <style>
            .my-icon {
                background-image: url(http://examples2.ext.net/Examples/Form/TriggerField/Custom_Icon/resources/images/custom-trigger.gif);
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
             
            <ext:ComboBox runat="server" TriggerCls="my-icon" />
        </form>
    </body>
    </html>
  9. #9
    Quote Originally Posted by Baidaly View Post
    Hello!

    Try the following:

    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
     
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
     
        <style>
            .my-icon {
                background-image: url(http://examples2.ext.net/Examples/Form/TriggerField/Custom_Icon/resources/images/custom-trigger.gif);
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
             
            <ext:ComboBox runat="server" TriggerCls="my-icon" />
        </form>
    </body>
    </html>
    Hi Baidaly

    I keep seeing a white page withi this code, thank you.

    Regards
  10. #10
    It seems Ext.NET 2.0 has the bug, so you wrap TirggerCls value by quotes. Use the following:

    <%@ Page Language="C#" %>
      
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
      
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
      
        <style>
            .my-icon {
                background-image: url(http://examples2.ext.net/Examples/Form/TriggerField/Custom_Icon/resources/images/custom-trigger.gif);
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
              
            <ext:ComboBox runat="server" TriggerCls="'my-icon'" />
        </form>
    </body>
    </html>
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 7
    Last Post: Mar 05, 2014, 9:42 AM
  2. Replies: 4
    Last Post: Dec 02, 2010, 1:44 PM
  3. How To Add Custom Icon in Ext:Combobox.
    By Rupesh in forum 1.x Help
    Replies: 2
    Last Post: Sep 21, 2010, 6:34 AM
  4. Replies: 3
    Last Post: Jul 20, 2010, 7:48 PM
  5. Trigger Field Icon
    By Kaido in forum 1.x Help
    Replies: 7
    Last Post: Feb 02, 2009, 12:49 PM

Tags for this Thread

Posting Permissions