怎么让滚动条始终保持在最下面?
比如#include <GUIConstants.au3>
GLOBAL $MESSAGE = "列表项目1"
GUICreate("我的 GUI 之列表") ; 创建一个居中显示的窗口
$add=GUICtrlCreateButton ("添加", 64,32,75,25)
$clear=GUICtrlCreateButton ("清除", 64,72,75,25)
$mylist=GUICtrlCreateList ("列表项目2", 176,32,121,97)
GUICtrlSetLimit(-1,200) ; 限制水平滚动条
GUICtrlSetData(-1,$MESSAGE)
$close=GUICtrlCreateButton ("我的关闭按钮", 64,160,175,25)
GUISetState ()
$msg = 0
While $msg <> $GUI_EVENT_CLOSE
$msg = GUIGetMsg()
Select
case $msg = $add
GUICtrlSetData($mylist,"您点击了第一个按钮!")
case $msg = $clear
GUICtrlSetData($mylist,"")
Case $msg = $close
MsgBox(0,"", "关闭按钮被点击",2)
Exit
EndSelect
Wend
当出现滚动条后怎么让滚动条始终保持在最后一条信息那?
[ 本帖最后由 ylvip 于 2008-6-5 00:49 编辑 ] #include <GUIConstants.au3>
#include <GuiListBox.au3>
Global $MESSAGE = "列表项目1"
$form = GUICreate("我的 GUI 之列表") ; 创建一个居中显示的窗口
$add = GUICtrlCreateButton("添加", 64, 32, 75, 25)
$clear = GUICtrlCreateButton("清除", 64, 72, 75, 25)
$mylist=GUICtrlCreateList ("列表项目2", 176,32,121,97)
GUICtrlSetLimit(-1, 200) ; 限制水平滚动条
GUICtrlSetData(-1, $MESSAGE)
$close = GUICtrlCreateButton("我的关闭按钮", 64, 160, 175, 25)
GUISetState()
$msg = 0
While $msg <> $GUI_EVENT_CLOSE
$msg = GUIGetMsg()
Select
Case $msg = $add
_GUICtrlListBox_AddString($mylist, "您点击了第一个按钮!")
_GUICtrlListBox_SetCurSel($mylist, _GUICtrlListBox_GetCount($mylist) - 1);
Case $msg = $clear
GUICtrlSetData($mylist, "")
Case $msg = $close
MsgBox(0, "", "关闭按钮被点击", 2)
Exit
EndSelect
WEnd 谢谢楼上已经绝 #include
#include
Global $MESSAGE = "列表项目1"
$form = GUICreate("我的 GUI 之列表") ; 创建一个 ...
pcbar 发表于 2008-6-4 18:49 http://www.autoitx.com/images/common/back.gif
找了好久才搜索到,谢谢
页:
[1]