itljl 发表于 2010-11-2 21:17:39

请教listview可以设置列表高度和字体大小吗?

本帖最后由 itljl 于 2010-11-3 22:22 编辑

请教listview可以设置高度吗?宽度是可以设置的,但高度还没有人设置过。
另外,想让里面的字大点,默认的太小了,看着好累。。

xuanfeng1234567 发表于 2010-11-3 01:40:15

本帖最后由 xuanfeng1234567 于 2010-11-3 01:41 编辑

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Local $listview, $button, $item1, $item2, $item3, $input1, $msg       
GUICreate("listview", 400, 250, 100, 200, -1, $WS_EX_ACCEPTFILES)
$listview = GUICtrlCreateListView("col1                         |col2                     |col3                  ", 10, 10, 380, 150);,$LVS_SORTDESCENDING)
GUICtrlSetFont($listview,16)
$button = GUICtrlCreateButton("Value?", 75, 170, 70, 20)
$item1 = GUICtrlCreateListViewItem("item2|col22|col23", $listview)
$item2 = GUICtrlCreateListViewItem("item1|col12|col13", $listview)
$item3 = GUICtrlCreateListViewItem("item3|col32|col33", $listview)
GUISetState()
        While 1
                $msg = GUIGetMsg()
                Switch $msg
                        Case $GUI_EVENT_CLOSE
                                Exit
                EndSwitch
        WEnd
        是这种效果吗?

netegg 发表于 2010-11-3 06:50:55

本帖最后由 netegg 于 2010-11-3 08:03 编辑

回复 2# xuanfeng1234567
估计不是,如果没想错,lz第一项的意思应该大致和多行文本在一项里的感觉差不多

itljl 发表于 2010-11-3 22:20:39

回复 2# xuanfeng1234567


    谢谢,是这样的。

itljl 发表于 2010-11-3 22:22:34

回复 2# xuanfeng1234567


    最好还能设置行高,现在是可以设置字体了。字体我一直没设置对目标。
页: [1]
查看完整版本: 请教listview可以设置列表高度和字体大小吗?