Combo (列表框)的项目文本 显示数量的问题[已解决]
本帖最后由 xyold1 于 2010-12-1 02:07 编辑刚发现Combo (列表框)多于30条项目文本会显示不了,在Koda里也试了,只能显示30条,不知这是不是AU3的限制,有没有解决的办法? #include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Form2", 491, 203, 266, 199)
$Combo1 = GUICtrlCreateCombo("Combo1", 64, 72, 289, 25, BitOR($CBS_DROPDOWNLIST,$WS_VSCROLL))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
For $i = 1 To 100
GUICtrlSetData($Combo1,$i)
Next
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd 主要是上面的这个$WS_VSCROLL起作用!
我一开始也是遇到楼主同样的问题,后来搜索帮助找到的!呵呵! 不错的代码。。 虽然是已经解决的问题,我还要回复一下,因为在我的电脑上,就算不加上后面的vscroll也能全部显示#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Form2", 491, 203, 266, 199)
$Combo1 = GUICtrlCreateCombo("Combo1", 64, 72, 289, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
For $i = 1 To 100
GUICtrlSetData($Combo1,$i)
Next
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd 谢谢分享,正用的上!如果能显示5个,然后在下拉就更好了!
页:
[1]