Code AardioLine:71复制
1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.31.32.33.34.35.36.37.38.39.40.41.42.43.44.45.46.47.48.49.50.51.52.53.54.55.56.57.58.59.60.61.62.63.64.65.66.67.68.69.70.71.import
win
.ui;var
winform = win
.form(text="aardio form"
;right=711
;bottom=407
)- winform.add(
- button={cls=
"button"
;text="添加"
;left=488
;top=328
;right=690
;bottom=388
;color=14120960
;flat=1
;font=LOGFONT(h=-14
);note="添加一个项目"
;z=2
}; - plus={cls=
"plus"
;left=0
;top=0
;right=688
;bottom=320
;clipBk=false
;edge=1
;notify=1
;z=1
}; - scrollbar={cls=
"scrollbar"
;left=688
;top=0
;right=708
;bottom=320
;edge=1
;z=3
} - )
- winform.show();
import
inet.httpvar
itemModel = {- {
-
type
="rect"
, - rectf={x=
3
;y=3
;width=-3
;height=-3
}, - name=
"项目背景色"
, - click=
true
; - width=
2
, - round=
4
, - color=0xFF009955,
- fillcolor=0x55009955,
- hoverfillcolor=0xBB009955,
- },
- {
-
type
="text"
, - rectf={x=
3
;y=3
;width=-3
;height=-3
}, - name=
"标题文字"
, - align=
1
; - valign=
1
; - smooth=
true
; - text=
""
, - font={name=
"Tahoma"
,h=-13
,color=0xFFFFFFFF,weight=700
}, - hoverfont={name=
"Tahoma"
,h=-16
,color=0xFFFFFF00,weight=700
}, - }
- }
-
var
itemList = {}for
(i=1
;40
;1
){- ..
table
.push(itemList,{标题文字="ITEM"
++i}) - }
-
import
godking.customPlusvar
c = godking.customPlus(winform.plus,itemModel,itemList,{- itemWidth=
80
, - itemHeight=
40
, - autoSizeWidth=
1
, - autoSizeHeight=
1
, - colnum=
0
, - rownum=
0
, - padLeft=
20
, - padTop=
20
, - padRight=
20
, - padBottom=
20
, - bkimg =
"https://img1.baidu.com/it/u=3977836567,3094831983&fm=253&fmt=auto&app=138&f=JPEG?w=750&h=500"
- });
-
- c.onClick =
function
(itemIndex){ - ..
win
.msgbox("您点击了:"
++itemIndex) - }
-
- winform.button.oncommand =
function
(id,event){ - c.addItem({标题文字=
"ITEM"
++( - c.update()
- }
- c.bindScrollbar(winform.scrollbar);
win
.loopMessage();
// 点击添加按钮超出范围后,, 滚动条滚动不了..
已修改,升级新版customPlus库,功能可正常使用。