找回密码
 加入
搜索
查看: 1750|回复: 3

[GUI管理] Combo更新内容后在列表中,不能显示出来

[复制链接]
发表于 2013-4-2 20:29:44 | 显示全部楼层 |阅读模式
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 438, 192, 124)
$Combo1 = GUICtrlCreateCombo("", 184, 56, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "COM1|COM2|COM3|COM4|COM5|COM6|COM7|COM8")
$Input1 = GUICtrlCreateInput("Input1", 190, 100, 121, 21)
$Button1 = GUICtrlCreateButton("Button1", 224, 160, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        GUICtrlSetData($Combo1, GUICtrlRead($Input1))
        EndSwitch
WEnd
Combo更新内容后在列表中,不能显示出来。连续在执行一次操作就能显示出来,这是为什么呢?
发表于 2013-4-2 21:19:39 | 显示全部楼层
GUICtrlSetData($Combo1, _GUICtrlComboBox_GetList($Combo1) & "|" & GUICtrlRead($Input1), GUICtrlRead($Input1))
发表于 2013-4-2 23:30:00 | 显示全部楼层
变化的内容没在循环里
发表于 2013-4-3 14:34:39 | 显示全部楼层
过来看看,顺道学习了
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-5 06:29 , Processed in 0.075915 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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