Jump to content

unicheckcombobox with an image


Didier

Recommended Posts

Hi,

I have a Tunicheckcombobox and a TUninativeImageList (FileAttachImgList).
In the property images of my checkcombobox, FileAttachImgList.

Iconeitems is ok too with the diferent index.

image.png.1076eec9cb8df03cbee3bc9b61bf4d73.png

 

 

But I didn't see my images.

All work fine with a Tunicombobox

image.png.8b8fa0ee0a1c02ed8ae5fad293891b68.png

 

Whatcan i do to to have my icones ?

 

Thank you

 

Link to comment
Share on other sites

Try this approach:

UniCheckComboBox.ClientEvents.ExtEvents ->

function afterrender(sender, eOpts)
{
    var repStr = '<span class="{icon.iconStr}">&nbsp;</span>{val}';
    sender.listConfig.tpl.html = sender.listConfig.tpl.html.replace('{val}', repStr);
}

 

Link to comment
Share on other sites

@Didier

Try this approach:

function afterrender(sender, eOpts)
{
    var repStr = '<tpl if="icon.iconStr"><span class="{icon.iconStr}"></span><tpl else><img style="margin-top:3px;width:16px;height:16px;" src="{icon.iconUrl}"/></tpl>&nbsp;{val}';
    sender.listConfig.tpl.html = sender.listConfig.tpl.html.replace('{val}', repStr);
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...