Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why is checkbox changing from checkmark to black square?

Status
Not open for further replies.

stanlyn

Programmer
Sep 3, 2003
945
0
16
US
Hi,

The form loads with a checkbox checked (as expected).
When selecting a different item, the checkbox is changed to the selected item but has a black square instead if the checkmark. I would like to keep checkmarks in checkboxes. See images...

Picture0002_zhlth6.png

Picture0003_kirgv9.png
Thanks,

This is cosmetic and functions completely as expected.
Stanley
 
This is not checked, this is either .NULL. or 2, this is the third state of a checkbox, undecided.
Checkbox can take values 0,1 and 2, when initialised with any of these numbers of .T., .F. and .NULL., when intialised with any of these boolean values.
You actually don't need to do anything to avoid the third states 2 or .NULL., even if the checkbox is bound to a variable, which can be .null., the third state doesn't happen automatically, even if you set it to 2 or .null., interactive usage only toggles between checked and non checked state.

But most important: No, this isn't just a cosmetic thing, you really risc having a wrong value inside your table field, eg can fail to store .NULL. into a non nullable logical field or store .NULL. instead of the wanted .T. or .F.

.NULL. partly acts the same way as .F., but surely not as .T., eg an IF .NULL. executes the ELSE branch, like .F.

Bye, Olaf.
 
Thanks Olaf,

You were right, following your lead it was easy to track down...

Thanks,
Stanley
 
Just a notice: In previous versions of windows the look of the third state (2 or .NULL.) was more apperent to be that uncertain state in being displayed as a faint grey check icon instead of a box/dot. As you describe it I think most users will also see this as checked, not as half checked. So this is a bad redesign of the UI of Windows.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top