Checkboxes in FancyListView?
-
23 mai 2010 18:50
Hi.
Is checkboxes in a FancyListView supported?
If I simply create a FancyListView, set checkboxes to true, add an item with checked=true, the items shows up, but no checkbox is visible.
The checkbox is visiable in design time in Visual Studio, but when I deploy it to my WHS the checkbox is not visible.
Doing the same with a standard ListView, it shows up correctly.
Any ideas?
(WHS v1)
My blog: InsomniacGeek.com
Toate mesajele
-
23 mai 2010 19:01Moderator
FancyListView uses custom drawing methods for items and subitems to avoid the default Windows Server 2003 theme. Pretty sure it doesn't implement anything to draw checkboxes (based on my last trawl through Reflector). You could open both ListView and FancyListView in Reflector and confirm that.
Tentacle Blog: http://www.tentaclesoftware.com/blog/
WHS Disk Management: http://www.tentaclesoftware.com/WHSDiskManagement/ -
23 mai 2010 19:46Moderator
Just dug around myself, and of course FancyListView sets OwnerDraw to true in its constructor.
There's a few hits on "listview ownerdraw checkboxes" when I search, but basically you'll need to create your own implementation of FancyListView to override the DrawSubItem/DrawItem event handlers with something like this: http://bytes.com/topic/c-sharp/answers/857997-problem-listview-ownerdraw-true-checkboxes-display-problem
Tentacle Blog: http://www.tentaclesoftware.com/blog/
WHS Disk Management: http://www.tentaclesoftware.com/WHSDiskManagement/