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

[AU3基础] 关于怎样设置ListView行高的问题

[复制链接]
发表于 2010-8-3 14:31:33 | 显示全部楼层 |阅读模式
搜索了一下论坛,好像说给ListItem设置给图标撑大它,具体是怎样呢,我给listitem设置了个图标,但是好像没法撑大。
$ListView1 = GUICtrlCreateListView("aaaa|bbbb|cccc", 0, 0, 500, 300, -1,  BitOR($WS_EX_CLIENTEDGE,$LVS_EX_FULLROWSELECT))
$ListView1_0 = GUICtrlCreateListViewItem("aaffff|34234234", $ListView1)
GUICtrlSetImage(-1, "E:\AutoIt\listview\test.bmp", -1,3)
发表于 2010-8-3 15:00:02 | 显示全部楼层
#include <GuiConstantsEx.au3>
#include <GuiListView.au3>
#include <WindowsConstants.au3>
#include <GuiConstants.au3>
#include <GuiImageList.au3>
        
GUICreate("ListView Get String Width", 400, 250)

$ListView1 = GUICtrlCreateListView("序号|属性|描述", 10, 10, 300, 150)
$hImage = _GUIImageList_Create(1, 25);25为间距
_GUICtrlListView_SetImageList($ListView1, $hImage, 1)
_GUICtrlListView_AddItem($ListView1, "行 1: 列 1", 0)
_GUICtrlListView_AddItem($ListView1, "行 2: 列 1", 1)
_GUICtrlListView_AddItem($ListView1, "行 3: 列 1", 2)

GUISetState()

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()

评分

参与人数 1金钱 +20 收起 理由
afan + 20

查看全部评分

发表于 2010-8-3 17:16:23 | 显示全部楼层
以前我怎么就没看到过
_GUIImageList_Create
这个函数呢 气死我也
发表于 2010-8-3 17:17:52 | 显示全部楼层
学了,,,记下!!!!!!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-22 00:51 , Processed in 0.088107 second(s), 25 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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