Re: UI design problem - exclusive checkboxes



Koms Bomb wrote:

How about just using the four check boxes, as you do now, and giving
each a click handler that unchecks the other three?

That violates with the UI design rules and one of such application
is listed on the "Interface Hall of Shame" :-(
That will really confuse the user.

"Rules are made to be broken" and I'll bet you that programmers are a
lot more familiar with the distinction between check boxes and radio
boxes than users are. I'd be surprised if one user in ten even noticed
that anything was strange about a set of check boxes acting like a set
of radio buttons, especially given the way the appearance of the two
varies from widget set to widget set. I also think that most users
would find it more natural to deselect an option by clicking it to
uncheck it than by clicking a "none" button.

In any case, you should be able to do the same thing with radio
buttons - clicking an unchecked radio button does the usual thing,
while clicking an checked radio button unchecks it.

I know this is a DELPHI forum, but I'm a lot more familiar with .NET
these days (for obvious reasons). You can do this easily in WinForms
by setting the button's AutoCheck property to false, and using this
click handler:

private void radioButton_Click(object sender, EventArgs e)
{
RadioButton Button = (RadioButton)sender;
Button.Checked = !Button.Checked;
if (Button.Checked)
// uncheck all other buttons in group
foreach (Control C in Button.Parent.Controls)
{
RadioButton Peer = C as RadioButton;
if (Peer != null && Peer != Button)
Peer.Checked = false;
}
}

--

..NET 2.0 for Delphi Programmers <http://www.midnightbeach.com/.net>

Delphi skills make .NET easy to learn
Being printed - in stores by June
.