Re: UI design problem - exclusive checkboxes
- From: "David Clegg" <dclegg@xxxxxxxxx>
- Date: Wed, 31 May 2006 18:53:42 +1200
Jon Shemitz wrote:
I know this is a DELPHI forum, but I'm a lot more familiar with .NET
these days (for obvious reasons).
Well, those two things aren't mutually exclusive, so you could've had
the courtesy of converting it first <vbg>
procedure TJonsForm.RadioButton_Click(Sender: TObject; E: EventArgs);
var
Button: RadioButton;
C: Control;
Peer: RadioButton;
begin
Button := RadioButton(Sender);
Button.Checked := not Button.Checked;
if Button.Checked then
for C in Button.Parent.Controls do
begin
Peer := C as RadioButton;
if Assigned(Peer) and (Peer <> Button) then
Peer.Checked := False;
end;
end;
There is also a fault with the logic, as when this event is called the
RadioButton.Checked property has already been updated, so the above
code toggles whatever the user really intended. Now *thats* an
unintuitive UI :-)
--
Cheers,
David Clegg
dclegg@xxxxxxxxx
http://cc.borland.com/Author.aspx?ID=72299
QualityCentral. The best way to bug Borland about bugs.
http://qc.borland.com
"Marge, your paintings look like the things they look like." - Homer
Simpson.
.
- Follow-Ups:
- Re: UI design problem - exclusive checkboxes
- From: Jon Shemitz
- Re: UI design problem - exclusive checkboxes
- References:
- UI design problem - exclusive checkboxes
- From: Koms Bomb
- Re: UI design problem - exclusive checkboxes
- From: Jon Shemitz
- Re: UI design problem - exclusive checkboxes
- From: Koms Bomb
- Re: UI design problem - exclusive checkboxes
- From: Jon Shemitz
- UI design problem - exclusive checkboxes
- Prev by Date: Re: UI design problem - exclusive checkboxes
- Next by Date: Re: Component Rankings, Startup Advice and other random tidbits
- Previous by thread: Re: UI design problem - exclusive checkboxes
- Next by thread: Re: UI design problem - exclusive checkboxes
- Index(es):