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

[GUI管理] 请教一下 GUICtrlCreateListView 的一些问题[已解决]

[复制链接]
发表于 2010-12-7 14:15:43 | 显示全部楼层 |阅读模式
本帖最后由 bfm13142 于 2010-12-8 10:18 编辑
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 445, 192, 124)
$ListView1 = GUICtrlCreateListView("计算机名|IP地址|状态", 128, 72, 385, 226,$LVS_SHOWSELALWAYS,$LVS_EX_GRIDLINES)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
        EndSwitch
WEnd
请问一下怎么能让这三个文本显示整个页面,不想还有第4个文本出来呢,找了好久找不到答案。
还有就是里面读取到的内容(如上面那张图片)能否设置让他居中?

有研究过这个函数的能否指教一下

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×

评分

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

查看全部评分

发表于 2010-12-7 15:28:08 | 显示全部楼层
本帖最后由 yhxhappy 于 2010-12-7 21:12 编辑

LZ,这个地址有汉化的UDF帮助文档,http://www.autoitx.com/thread-15708-1-1.html

#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#Include <GuiListView.au3>

$Form1 = GUICreate("Form1", 623, 445, 192, 124)
$ListView1 = GUICtrlCreateListView("", 128, 72, 385, 226,$LVS_SHOWSELALWAYS,$LVS_EX_GRIDLINES)
_GUICtrlListView_AddColumn($ListView1, "计算机名", 100, 2)          ;在ListView内创建一列,100 表示列的宽度,2 表示居中(0=左对齐,1=右对齐),下同
_GUICtrlListView_AddColumn($ListView1, "IP地址", 150, 2)
_GUICtrlListView_AddColumn($ListView1, "状态", 130, 2)

GUICtrlCreateListViewItem("AAA|192.168.0.1|SSSSS", $ListView1)

GUISetState(@SW_SHOW)

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
        EndSwitch
WEnd

评分

参与人数 1金钱 +10 收起 理由
bfm13142 + 10 谢谢帮忙

查看全部评分

 楼主| 发表于 2010-12-8 10:17:18 | 显示全部楼层
感谢你的帮忙,我再研究看!
 楼主| 发表于 2010-12-8 10:17:42 | 显示全部楼层
问题已解决,解决方法在 2 楼!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-19 19:31 , Processed in 0.086581 second(s), 30 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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