C # Custom ListView

Does anyone have any info on creating / drawing a custom ListView object?

I am currently working on a project that requires an individual look in the application. I am using the standard (Windows.Forms) ListView, which is not in the same style as the rest of the GUI. We do not use the toolbar for user controls, all controls are "cut off" as if by overriding the hte OnPaint () method for each control.

What I'm looking for: - Information on how to handle the scroll bar pattern. - How to use custom drawing procedures to handle column headings. - How to still process the displayed data and draw correctly.

Any help would be received.

+4
source share
2 answers

From what I can tell, you will need to actually make some Win32 calls using NM_CUSTOMDRAW to actually change the drawing behavior of the control. Here is one article I found. You will have to dig more.

+1
source

Subclass ListBox . In ctor, set the drawing mode to OwnerDrawVariable and override OnDrawItem and OnMeasureItem . I like to have a special Item class that allows the user to specify any custom drawing for this element, as well as an object that will be data.

+2
source

Source: https://habr.com/ru/post/1277620/


All Articles