'Triple state grey' versus 'use windows themed control on forms'

H

H. Martins

Hi.

If I use Windows Themes Control on Forms (plus triple state on) with
checkboxes doesn't produce greyed checkboxes when NULL.

If I don't use Windows Themes Control on Forms I have greyed
checkboxes but the form becomes ugly.

Is there a way to keep forms good locking and grayed checkboxes?

Thanks
Henry
 
M

Marshall Barton

H. Martins said:
If I use Windows Themes Control on Forms (plus triple state on) with
checkboxes doesn't produce greyed checkboxes when NULL.

If I don't use Windows Themes Control on Forms I have greyed
checkboxes but the form becomes ugly.

Is there a way to keep forms good locking and grayed checkboxes?

Not with the check box control. It works the way it works
as do most of the 3D controls (eg. Command, Radio, Toggle
buttons).

OTOH, you can simulate a check box fairly easily by using a
small text box with little code. Set the text box's font
and font size to a character set that includes your favorite
mark character (I like "X") and a meaningful character for
the Null value (maybe a "?"). Then set the text box's
Format property to:
"X";"X";" ";"?"
If you prefer the grayed style, use Conditional Formatting
to set the backcolor when the value is Null,

Then use code in it's Click event:
If IsNull(Me.txtchk) Then
Me.txtchk = False
ElseIf Me.txtchk = False Then
Me.txtchk = True
Else
Me.txtchk = Null
End If

Once you create one of these, you can Copy/Paste it to
anywhere else you want it. When used on a form be sure to
Copy the Click event procedure too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top