找回密码
 加入
搜索
查看: 2626|回复: 4

[GUI管理] 如何获取Combo中的所有列表

[复制链接]
发表于 2010-8-15 16:20:18 | 显示全部楼层 |阅读模式
如何获取Combo中的所有列表
发表于 2010-8-15 16:36:39 | 显示全部楼层
本帖最后由 cutyourchicken 于 2010-8-15 16:40 编辑

函数参考
_GUICtrlComboBox_GetCount
--------------------------------------------------------------------------------

返回项目数量


#Include <GuiComboBox.au3>
_GUICtrlComboBox_GetCount($hWnd)




参数

$hWnd 控件句柄



返回值

成功: 项目数量
失败: -1







++++++++++++++++++++++++++++++++++++++++++





函数参考
_GUICtrlComboBox_GetList
--------------------------------------------------------------------------------

Retrieves all items from the list portion of a ComboBox control(检索一个ComboBox控件列表的所有项目)


#Include <GuiComboBox.au3>
_GUICtrlComboBox_GetList($hWnd)




参数

$hWnd Handle to control



返回值

Success: Delimited string of all ComboBox items



注意/说明

Default delimiter is "|" this can be change using the Opt("GUIDataSeparatorChar", "new delimiter")
 楼主| 发表于 2010-8-15 16:41:53 | 显示全部楼层
我不想要得到几行。 我想得到里面的内容

比如:

$Combo=GUICtrlCreateCombo("",10,10,160,20)
GUICtrlSetData($Combo,"item1|item2|item3")


我想得到:item1|item2|item3
发表于 2010-8-15 16:43:30 | 显示全部楼层
回复 3# jneyxwry


    那你可以用_GUICtrlComboBox_GetList 函数试试

评分

参与人数 1金钱 +20 收起 理由
afan + 20

查看全部评分

 楼主| 发表于 2010-8-15 17:09:54 | 显示全部楼层
感谢。此函数正解!!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-4-27 18:44 , Processed in 0.101503 second(s), 27 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表