Showing images in Combobox

Hi

I need to show all country languages in a combobox. I have shown the country flag and country name in the combobox. I have used database valulist from table value. The calculation field is like this

function lang_clcs_flag_name()
{
	var x = '<html><body ><img src= "media:///languages/' + language_id.toLowerCase() +'.png" /> '+lang_name.toUpperCase()+'
</body></html>'
	return x;
}

Now I have fixed the size of the combobox according to the picture and country name. But while click on the combobox the size is very large according to the length of “x”(See the screen shot).

So Is there any solution for this ??? :( :( :(

Thanks,
Satya

maybe play a bit with the calculation?
like if you dont show a image what then? or if you remove that last
?

work with tables, this is an example we use:

return '<html><table><tr><td width="25px" bgcolor="'+colortext +'"><td>
</td><td width="60px">' + activitieslabel + '</td></tr></table></html>'

Thanks Harjo and Jcompagner

The solution is not working. Again the length of the combobox is the length of the html like the above screen shots. I have made changes on the calculation and play with different ways but result is same.

You can test the valuelist by using custom values also like here ,

<html><body ><img src= "media:///languages/1.png" /></body></html>
<html><body ><img src= "media:///languages/2.png" /></body></html>

You can see while click on the combox the length is equal to the length of the html text.

Is there any solution?? :( :( :(

Thanks,
Satya

are we talking here smart or webclient?
I guess there is some calculation being done that just bases itself purely on the string length
you can make a case

Hi jcompagner

I have created a case in servoy Jira. I have also added a sample solution.

Thanks,
Satya