• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

CheckBoxes in VB6

thatbox

Senior member
I need CheckBoxes that have an extra state: X. The default CheckBoxes can only be checked and unchecked -- is there another object designed for this? I'm a semi-noob in VB, sorry. Any help will be greatly appreciated!
 
If you're looking for tri-state check boxes where one is checked, one is not, and the other is grayed over (like in an installation package where you install some of a products sub features but not all), then vb's current checkbox control will not support this by default, at least not in my current memory 😉

You can get it to do what you want, but it'd be tricky. If you're a semi-noob in vb, I wouldn't recommend trying it You'd have to subclass the WM_PAINT and WM_CLICK messages to get it to do what you want as well as use a module level variable. www.vbaccelerator.com has an excellent subclassing dll that'd work perfect. But you'd have to figure out how to do the rest of it on your own. It'd be a combination of a subclassed & owner drawn control.

BTW--if you don't know what subclassing is----you intercept teh default windows messages to a control to apply your own behavior for those messages instead of using the controls' default responses to those messages. Again, if you're new to VB, I wouldn't recommend this way.

The other alternative is 3rd party controls---i'm sure there's some out there that support what you're looking for.

 
Actually, VB6 does support checked, unchecked, and greyed, but unfortunately a user can't grey a box by clicking twice. I've seen these things before, with blank, checked, and xed (an X instead of a check). I can imagine how you'd do it with heavy programming (lots, including making a few pictures of a box with an X to display after the two clicks, right?) but I'm just not there yet. Any idea where I could find a good index of third party controls to look through?
 
I can imagine how you'd do it with heavy programming (lots, including making a few pictures of a box with an X to display after the two clicks, right?) but I'm just not there yet.

You can just use the image object and change the pictures OnClick().
 
Back
Top