You are not logged in.

1

Thursday, August 16th 2018, 1:31pm

Add custom icons on combobox

How can I add to a Combobox with custom icons and text?

Thanks
Suso

San7

Professional

Posts: 626

Occupation: coding in krpano

  • Send private message

2

Saturday, August 18th 2018, 6:32pm

Maybe it's not quite right, but it works for me.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
	<combobox name="cbscenes2" design="vtour" align="lefttop" x="10" y="10" onloaded="for(set(i,1), i LT 4, inc(i),add_scene_items2(get(i));)" />	
	<action name="add_scene_items2" scope="local">
		caller.additem(calc('[img src=[dq]' + image_cb.url_%1 + '[dq] style=[dq]border:1px solid rgba(255,255,255,0.5);width:48px;height:32px;vertical-align:middle;margin-right:8px;[dq]/] '+ image_cb.tit_%1), get(image_cb.click_%1) );		
	</action>
	
	<image_cb  url_1="icon/IMG_1.jpg"
		   tit_1="example 1"
		   click_1="loadscene(0,null,MERGE,BLEND(0.5))"
		   url_2="icon/IMG_2.jpg"
		   tit_2="example 2"
		   click_2="loadscene(1,null,MERGE,BLEND(0.5))"
		   url_3="icon/IMG_3.jpg"
		   tit_3="example 3"
		   click_3="loadscene(2,null,MERGE,BLEND(0.5))"
	      />

3

Sunday, August 19th 2018, 3:22pm

Hi San , thanks for your help
Suso *thumbup*