
VB6:TripleState Checkboxes in TreeView and ListView controls?
Quote:
> Hi!
> I've been trying to use TripleState Checkboxes in TreeView and ListView
> controls, but that seems impossible in VB6.
> Does anybody know how to implement these??? I NEED them!
I posted an article about this about a year and a half ago...I think it's
one of the few things you can do with these controls that isn't documented
on Randy Birch's excellent VBNet site. My original post was geared toward
VB5, but I don't think there's anything in it that can't be used with VB6.
It's not pretty--it can't be done in pure VB, but instead requires use of
the Win32 API. But the technique will allow you to specify *any* type of
state icon, not just checked/unchecked, and supports more than just the
two states that the Checkboxes style allows.
Anyway, the post is still archived at
http://www.deja.com/getdoc.xp?AN=388178251
Deja mangles the formatting a bit, ignoring line breaks, but it's still
useable.
You may also find another post of mine to be useful. It's at
http://www.deja.com/getdoc.xp?AN=385892301
and describes how to tell where in the ListView the user clicked--on an
icon, label. sub-item, or state icon. You'll need it if you want to be
able to respond appropriately if users click on the state icon.
--