找回密码
 加入
搜索
查看: 5572|回复: 5

[AU3基础] Combo (列表框)的项目文本 显示数量的问题[已解决]

  [复制链接]
发表于 2010-11-30 16:17:12 | 显示全部楼层 |阅读模式
本帖最后由 xyold1 于 2010-12-1 02:07 编辑

刚发现Combo (列表框)多于30条项目文本会显示不了,在Koda里也试了,只能显示30条,不知这是不是AU3的限制,有没有解决的办法?

评分

参与人数 1金钱 +10 收起 理由
afan + 10 感谢主动将修改帖子分类为[已解决],请继续 ...

查看全部评分

发表于 2010-11-30 17:06:01 | 显示全部楼层
#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

评分

参与人数 1金钱 +10 收起 理由
xyold1 + 10 谢谢

查看全部评分

发表于 2010-12-4 15:51:44 | 显示全部楼层
主要是上面的这个$WS_VSCROLL起作用!
我一开始也是遇到楼主同样的问题,后来搜索帮助找到的!呵呵!
发表于 2011-2-20 17:54:19 | 显示全部楼层
不错的代码。。
发表于 2011-3-4 20:52:59 | 显示全部楼层
虽然是已经解决的问题,我还要回复一下,因为在我的电脑上,就算不加上后面的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
发表于 2014-6-10 13:37:50 | 显示全部楼层
谢谢分享,正用的上!如果能显示5个,然后在下拉就更好了!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-27 17:23 , Processed in 0.085790 second(s), 28 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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