Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ComboBoxItem & item icons

    Hi,

    I've tried to create combobox with icon for each item of dropdownlist. In the list there are icons but as selected value is displayed

    "<img src='http://127.0.0.1:8888/shop/sc/skins/SilverWave/images/blank.gif' style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="http://127.0.0.1:8888/shop/sc/skins/SilverWave/images/actions/sort_ascending.png",sizingMethod="scale");' width='16' height='16' align='TEXTTOP' border='0' suppress='TRUE'/>Názvu"

    instead image.

    any ideas?

    Code:
    LinkedHashMap<String, String> orders = new LinkedHashMap<String, String>();
    		orders.put("1", Canvas.imgHTML("[SKIN]/actions/sort_ascending.png")+Constants.ins.byName());
    		orders.put("2", Canvas.imgHTML("[SKIN]/actions/sort_descending.png")+Constants.ins.byNameDesc());
    		orders.put("3", Canvas.imgHTML("[SKIN]/actions/sort_ascending.png")+Constants.ins.byPrice());
    		orders.put("4", Canvas.imgHTML("[SKIN]/actions/sort_descending.png")+Constants.ins.byPriceDesc());
    		orders.put("5", Canvas.imgHTML("[SKIN]/actions/sort_ascending.png")+Constants.ins.byAvailibility());
    		orders.put("6", Canvas.imgHTML("[SKIN]/actions/sort_descending.png")+Constants.ins.byAvailibilityDesc());
    		orders.put("7", Canvas.imgHTML("[SKIN]/actions/sort_ascending.png")+Constants.ins.bySellPerMonth());
    		orders.put("8", Canvas.imgHTML("[SKIN]/actions/sort_descending.png")+Constants.ins.bySellPerMonthDesc());
    		
    		
    		ComboBoxItem order = new ComboBoxItem();
    		order.setTitle("<nobr>"+Constants.ins.orderBy()+"</nobr>");
    		order.setValueMap(orders);
    		
    		
    		order.setDefaultValue("1");

    #2
    See http://www.smartclient.com/smartgwt/showcase/#styled_combobox_category

    Comment


      #3
      Thank you svjard,

      that is what I'm looking for.

      Comment

      Working...
      X