comboboxEx 高级下拉框

光庆 7月前 952

import win.ui;
import godking.comboboxEx
/*DSG{{*/
var winform = win.form(text="aardio form";right=759;bottom=469)
winform.add(
button={cls="button";text="删除";left=96;top=256;right=232;bottom=320;z=2};
button2={cls="button";text="添加";left=264;top=256;right=400;bottom=320;z=3};
comboboxEx={cls="comboboxEx";left=168;top=136;right=360;bottom=160;db=1;dr=1;mode="dropdownlist";z=1};
comboboxEx2={cls="comboboxEx";left=448;top=136;right=640;bottom=160;db=1;dr=1;mode="dropdownlist";z=4};
picturebox={cls="picturebox";left=496;top=280;right=664;bottom=440;z=5};
static2={cls="static";text="高级列表框带图标";left=192;top=80;right=336;bottom=112;transparent=1;z=6};
static3={cls="static";text="高级列表框空图标模拟行高";left=456;top=88;right=688;bottom=120;transparent=1;z=7}
)
/*}}*/

import win.imageList
var il = win.imageList(30,30)
for(i=1;10;1){
	il.addBitmap(..gdip.bitmap("E:\图片素材\png\png32_灰色简洁\"++(i+30)++".png").copyHandle(30,30))
}
winform.comboboxEx.setImageList(il)
winform.comboboxEx.setItems ( {"项目1:123123","项目2:asdadad","项目3:士大夫撒发","项目4:这里是项目4"},,{0,3,3,0})
winform.comboboxEx.setFont(h=-14;name="宋体");

var il2 = win.imageList(1,30)
winform.comboboxEx2.setImageList(il2)
winform.comboboxEx2.setItems ( {"项目1:123123","项目2:asdadad","项目3:士大夫撒发"})
winform.comboboxEx2.setFont(h=-14;name="宋体");
winform.comboboxEx2.redraw()

winform.button.oncommand = function(id,event){
	winform.comboboxEx.delete();
	winform.comboboxEx.redraw();
}

winform.button2.oncommand = function(id,event){
	winform.comboboxEx.insert("这是新项目",winform.comboboxEx.count+1)
}

winform.show();
win.loopMessage();


最新回复 (1)
  • 小肥羊 7月前
    0 2
    可以啊,666,又有新作品
返回