jneyxwry 发表于 2010-8-15 16:20:18

如何获取Combo中的所有列表

如何获取Combo中的所有列表

cutyourchicken 发表于 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")

jneyxwry 发表于 2010-8-15 16:41:53

我不想要得到几行。 我想得到里面的内容

比如:

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


我想得到:item1|item2|item3

cutyourchicken 发表于 2010-8-15 16:43:30

回复 3# jneyxwry


    那你可以用_GUICtrlComboBox_GetList 函数试试

jneyxwry 发表于 2010-8-15 17:09:54

感谢。此函数正解!!
页: [1]
查看完整版本: 如何获取Combo中的所有列表