炫彩界面复制List列表1到List列表2[己解决]
本帖最后由 chzj589 于 2016-12-19 12:04 编辑这几天又学习炫彩界面,上面的函数不会使用,
我想炫彩界面复制List列表1到List列表2,有请guland 帮助,谢谢!
代码:-------------------------------------------------------------
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseX64=n
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
Global $_hAdapter
#include "XCGUI_Fun.au3"
XInitXCGUI()
$create = XWnd_Create("500", "500", "900", "700", "窗口测试", 47)
$str = XShapeText_Create("8", "6", "100", "20", " 复制List列表1到List列表2", $create)
$font = XFont_Create2("宋体", "12", True, False, False, False) ;创建字体
XShapeText_SetFont($str, $font) ;设置XShapeText元素字体
XShapeText_SetTextColor($str, 0x00ff66, 255) ;设置XShapeText元素颜色
$XList = XList_Create("20", "40", "840", "300", $create)
XList_SetItemHeightDefault($XList, 18, 25) ;设置项未选中高度,选中高度
$ggg = XList_SetItemTemplateXML($XList, @ScriptDir & "\List_Item.xml") ;加载列表模板
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)
$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 & "-1")
XAdapterTable_SetItemText($XA, $i, 4, "ListBox-" & $i & "-2")
XAdapterTable_SetItemText($XA, $i, 5, "ListBox-" & $i & "-1")
XAdapterTable_SetItemText($XA, $i, 6, "ListBox-" & $i & "-2")
Next
$XLista = XList_Create("20", "350", "840", "300", $create)
XList_SetItemHeightDefault($XLista, 18, 25) ;设置项未选中高度,选中高度
$ggg = XList_SetItemTemplateXML($XLista, @ScriptDir & "\List_Item.xml") ;加载列表模板
XList_AddColumn($XLista, 100) ;设置列宽度
XList_AddColumn($XLista, 100)
XList_AddColumn($XLista, 100)
XList_AddColumn($XLista, 100)
XList_AddColumn($XLista, 100)
XList_AddColumn($XLista, 100)
XList_AddColumn($XLista, 100)
$XAma = XAdapterMap_Create()
XList_BindAdapterHeader($XLista, $XAma)
$XAa = XAdapterTable_Create()
XList_BindAdapter($XLista, $XAa)
XAdapterTable_AddColumn($XAa, "name")
XAdapterTable_AddColumn($XAa, "name2")
XAdapterTable_AddColumn($XAa, "name3")
XAdapterTable_AddColumn($XAa, "name4")
XAdapterTable_AddColumn($XAa, "name5")
XAdapterTable_AddColumn($XAa, "name6")
XAdapterTable_AddColumn($XAa, "name7")
$btn2 = XBtn_Create("800", "660", "75", "25", "退出程序", $create)
$btn3 = XBtn_Create("700", "660", "75", "25", "复制List", $create)
XEle_RegEventC($btn2, "btn2")
XEle_RegEventC($btn3, "btn3")
XWnd_ShowWindow($create)
XRunXCGUI()
Func btn2($bh)
xquit_acn($create)
EndFunc ;==>btn2
Func btn3($bh)
;复制List
XListView_GetSelectItem($XList)
;获取选择项,
;$_hEle=控件句柄,
;返回值为数组, 是否成功分组索引项索引
XListView_GetSelectItemCount($XList)
;获取选择项数量
;$_hEle=控件句柄
;返回值:选择项数量
XAdapterListView_Item_GetCount($hAdapter,$iGroup)
;获取指定组中项数量
;$hAdapter数据适配器句柄
;$iGroup组索引
;返回值:项数量
EndFunc ;==>btn3
guland版主好久没登录了,静等------- guland版主好久没登录了,静等-------
chzj589 发表于 2016-11-27 17:30 http://www.autoitx.com/images/common/back.gif
还有Tree-列表树里如何获取项目文本
XAdapterTree_GetItemTextEx($_hAdapter, $_nID, $_pName, $_pOut, $_nOutLen)
上面这句参数要怎么使用? 求救,不够钱钱
页:
[1]