[求助] 改变list 各项目之间的 间距
只是为了看起来更舒服.. 默认的看起来拥挤! 希望找到改变各项之间间距的方法!!
大大们帮忙...
-----
这个技能将应用到 代码收藏家.exe
可以到cikeexe.ys168.com 下载到..
[解决办法]
可以实现,必须用API:(VB自带的控件就是烂,简直是技术保护)
Private Declare Function SendMessageLong Lib "user32 " Alias "SendMessageA " (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Const LB_SETITEMHEIGHT = &H1A0
Private Sub Command1_Click()
Dim ReturnMes As Long
ReturnMes = SendMessageLong(List1.hwnd, LB_SETITEMHEIGHT, 0, 100) ' 100为行距,单位为像素)
List1.Refresh
End Sub
Private Sub Form_Load()
List1.AddItem "第一行 "
List1.AddItem "第二行 "
List1.AddItem "第三行 "
End Sub