[CLOSED] MVC Icon ComboBox

  1. #1

    [CLOSED] MVC Icon ComboBox

    Hi Guys,

    Is there an MVC example for the Icon Combobox. I am trying to implement using the method in the sample but with no luck. Please provide a sample or some guidance.
    Last edited by Daniil; Apr 26, 2012 at 7:01 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Do you mean the following example?
    https://examples1.ext.net/#/Form/ComboBox/IconCombo/

    Well, we have no such example. But I'm not sure what exactly you'd like to implement in MVC manner?

    Please clarify what exactly problem are you facing?

    Do you register icons?

    I've just launched the same page in the MVC project - appears to be working correctly.
  3. #3
    Hi,

    I am not sure how to register the icons in the controller of the page as the ResourceManager is not accessible. How is this done in javascript so i don't need to use page load. I am also using a partial view.

    Also is it possible for me to register my own external icons to be displayed in the list. How do i go about doing this?
  4. #4
    Please use:
    Ext.net.ResourceMgr.registerIcon(["FlagFr","FlagCa","FlagDe","FlagUs","FlagIt"]);
    to register icons client side.
  5. #5

    Hi

    Hi,

    Is it possible for me to register my own icons. I don't want to use the icon list within EXT.
  6. #6
    At the end an icon is just a CSS rule.

    You can place any CSS rules on a page within
    <style type="text/css">
        icons CSS classes here
    </style>
    A common "icon" CSS rule looks like this:
    <style type="text/css">
        .my-icon {
            background-image: url("myIcon.png") !important;
            background-repeat: no-repeat;
        }
    </style>
    To use your custom icon you should set up the IconCls property.
    IconCls="my-icon"
  7. #7
    Hi,

    Should I be able to register a my icon css class with the resource manager as shown below.


    style type="text/css">
        .my-icon {
            background-image: url("myIcon.png") !important;
            background-repeat: no-repeat;
        }
    </style>
    
    Ext.net.ResourceMgr.registerIcon(["my-icon"]);
    I am trying to register my icon to use in the icon combo box. I am going to do a mock up to show show you what I am doing or if you have a mock you could post here.
  8. #8
    In this case you can use the registerCssClass method.

    Example
    var myIcon = '.my-icon{background-image:url("myIcon.png") !important;background-repeat:no-repeat !important;}';
    Ext.net.ResourceMgr.registerCssClass("my-icon", myIcon);
  9. #9
    Hi,

    Thanks you, please mark as solved.

Similar Threads

  1. Combobox with Icon
    By Maia in forum 1.x Help
    Replies: 7
    Last Post: Sep 03, 2010, 5:32 PM
  2. [CLOSED] Problem using icon comboBox
    By flormariafr in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 11, 2010, 10:33 AM
  3. Replies: 5
    Last Post: Mar 05, 2010, 3:15 PM
  4. [CLOSED] Refresh icon on combobox
    By reinout.mechant@imprss.be in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: May 29, 2009, 6:14 AM

Posting Permissions