开发者

SysListView32 like mouse selection rectangle

Can I make a mouse selection rectangle in a List Vi开发者_Go百科ew like in a SysListView32?

SysListView32 like mouse selection rectangle

Is there a way to work with a SysListView32 and use it in Delphi?

Thanks!


You need to set LVS_EX_DOUBLEBUFFER style of the list view (only applicable with comctl32.dll version 6.0 (XP) and later):

[...] This extended style also enables alpha-blended marquee selection on systems where it is supported.


uses
  commctrl;
..

ListView_SetExtendedListViewStyle(ListView1.Handle, LVS_EX_DOUBLEBUFFER);


It also works with the TShellListView component included as a demo. See this answer to find out how to find and install the shell controls.

(PS: Don't forget to set Multiselect to true)


The site appears to be down currently, but there's a Delphi ListView component available for free from Mustangpeak that has this feature and more that are found in the modern Windows list view.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜