开发者

Setting item height of a list view? (using custom draw)

开发者 https://www.devze.com 2023-01-07 04:45 出处:网络
开发者_如何学PythonHow can I set the row height of a custom drawn list view? Or does it require an owner drawn list view?It depends on the mode you are using it in.In some modes, you can use the LVM_S
开发者_如何学Python

How can I set the row height of a custom drawn list view? Or does it require an owner drawn list view?


It depends on the mode you are using it in. In some modes, you can use the LVM_SETITEMHEIGHT message. In others some modes, the item height is dictated by the height of an associated ImageList, if any, followed by the height of the assigned Font.

Update: turns out that LVM_SETITEMHEIGHT is part of the MiniGUI library, not part of the Win32 API. In that case, you would have to use the LVS_OWNERDRAWFIXED window style and then subclass the ListView to handle the WM_MEASUREITEM message.

0

精彩评论

暂无评论...
验证码 换一张
取 消