找回密码
 加入
搜索
查看: 4284|回复: 4

[交流] ListView控件显示网格整个控件就会凸起,请问怎么解决?

[复制链接]
发表于 2014-9-8 17:48:43 | 显示全部楼层 |阅读模式
悬赏1金钱已解决
#include <GuiListView.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#region ### START Koda GUI section ### Form=

$Form1 = GUICreate("Form1", 623, 442, 192, 124)
$ListView1 = GUICtrlCreateListView("1|2|3|4", 40, 30, 541, 371, "", $LVS_EX_GRIDLINES)
$List = GUICtrlCreateListViewItem("2014/03/23-23:12:23|12341234|12341234|Test", $ListView1)
_GUICtrlListView_SetColumnWidth($ListView1, 0, $LVSCW_AUTOSIZE)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###

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

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

最佳答案

发表于 2014-9-8 17:48:44 | 显示全部楼层
本帖最后由 lpxx 于 2014-9-9 05:05 编辑
#include <GuiListView.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#region ### START Koda GUI section ### Form=
Global $iExStyle = ""
$Form1 = GUICreate("Form1", 623, 442, 192, 124)
$ListView1 = GUICtrlCreateListView("1|2|3|4", 40, 30, 541, 371, -1)
$iExStyle += $LVS_EX_GRIDLINES ; 项目和子项显示网格.
_GUICtrlListView_SetExtendedListViewStyle($ListView1, $iExStyle)
$List = GUICtrlCreateListViewItem("2014/03/23-23:12:23|12341234|12341234|Test", $ListView1)
_GUICtrlListView_SetColumnWidth($ListView1, 0, $LVSCW_AUTOSIZE)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###

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

        EndSwitch
WEnd
 楼主| 发表于 2014-9-8 17:50:18 | 显示全部楼层
后来找着别人写现成的程序用SPY++读出其中的控件样式,结果ListView控件又凹下去了。额。
发表于 2021-12-27 08:43:00 | 显示全部楼层

不错支持一下
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-3-29 12:50 , Processed in 0.074541 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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