sky808 发表于 2009-8-18 23:49:18

如何获得GUICtrlCreateList()的所有列表信息

请问如何获得GUICtrlCreateList()的所有列表信息呢?
用GUICtrlRead()只能获得选中的项目,不能获得列表中所有项目.
麻烦高手指点,多谢!

sky808 发表于 2009-8-19 10:46:37

有人回答下嘛,高手们帮帮忙拉.

水木子 发表于 2009-8-19 10:49:05

试试这个呢?
ControlGetText ( "窗口标题", "窗口文本", 控件ID)

afan 发表于 2009-8-19 11:11:56

好像没有获取整个的函数,只能循环读取

sky808 发表于 2009-8-19 12:04:34

那应该怎样循环读取呢?
好像没有可选的参数指定某项列表的吧.

afan 发表于 2009-8-19 12:36:51

本帖最后由 afan 于 2009-8-19 14:12 编辑


Dim $str, $strz = ''
For $i = 0 to _GUICtrlListBox_GetCount($List1)-1
        $str = _GUICtrlListBox_GetText($List1,$i)
        $strz &= $str & @CRLF
next
msgbox(0,0,$strz)

sky808 发表于 2009-8-19 13:55:07

thanks,试试看.
页: [1]
查看完整版本: 如何获得GUICtrlCreateList()的所有列表信息