|
发表于 2016-3-23 18:31:22
|
显示全部楼层
回复 13# guland
XList_Create不能添加列?
$create = XWnd_Create("500", "500","860", "500", "窗口测试", 47)
$XList = XList_Create("20", "40", "820", "400", $create)
XList_AddColumn($XList, 100)
XList_AddColumn($XList, 100)
XList_AddColumn($XList, 100)
XList_AddColumn($XList, 100)
XList_AddColumn($XList, 100)
XList_AddColumn($XList, 100)
XList_AddColumn($XList, 100)
$XAm = XAdapterMap_Create()
XList_BindAdapterHeader($XList, $XAm)
XAdapterMap_AddItemText($XAm, "name", "ID");ID|第一列|第二列
XAdapterMap_AddItemText($XAm, "name2", "第一列")
XAdapterMap_AddItemText($XAm, "name3", "第二列")
XAdapterMap_AddItemText($XAm, "name4", "第三列")
XAdapterMap_AddItemText($XAm, "name5", "第四列")
XAdapterMap_AddItemText($XAm, "name6", "第五列")
XAdapterMap_AddItemText($XAm, "name7", "第六列")
$XA = XAdapterTable_Create()
XList_BindAdapter($XList, $XA)
XAdapterTable_AddColumn($XA, "name")
XAdapterTable_AddColumn($XA, "name2")
XAdapterTable_AddColumn($XA, "name3")
XAdapterTable_AddColumn($XA, "name4")
XAdapterTable_AddColumn($XA, "name5")
XAdapterTable_AddColumn($XA, "name6")
XAdapterTable_AddColumn($XA, "name7")
For $i = 0 To 10
XAdapterTable_AddItemTextEx($XA, "name", "ListBox")
XAdapterTable_SetItemText($XA, $i, 1, "ListBox-" & $i & "-1")
XAdapterTable_SetItemText($XA, $i, 2, "ListBox-" & $i & "-2")
XAdapterTable_SetItemText($XA, $i, 3, "ListBox-" & $i & "-3")
XAdapterTable_SetItemText($XA, $i, 4, "ListBox-" & $i & "-4")
XAdapterTable_SetItemText($XA, $i, 5, "ListBox-" & $i & "-5")
XAdapterTable_SetItemText($XA, $i, 6, "ListBox-" & $i & "-6")
XAdapterTable_SetItemText($XA, $i, 7, "ListBox-" & $i & "-7")
Next
;XEle_SetFocusBorderColor($XList,0xff0000,255) ;设置XShapeText元素颜色
$btn2 = XBtn_Create("400", "460", "75", "25", "退出程序", $create)
XEle_RegEventC($btn2, "btn2")
XWnd_ShowWindow($create)
XRunXCGUI()
添加列不能显示? |
|