View Issue Details

IDProjectCategoryView StatusLast Update
0004551JEDI VCL00 JVCL Componentspublic2008-10-24 13:56
ReporterahotkoAssigned ToAHUser 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.35 
Target VersionFixed in Version3.36 
Summary0004551: TJvCheckBox, DataConnector: If Field is null, Checkbox is Checked
DescriptionIf field is null, checkbox is checked. I think it shoul be grayed, so it shows
undefined value. Method TJvCheckBoxDataConnector.RecordChanged should be changed
to take this into account.
Old Code:
procedure TJvCheckBoxDataConnector.RecordChanged;
begin
  if Field.IsValid and (ValueChecked <> '') and (ValueUnchecked <> '') then
  begin
    FCheckBox.ReadOnly := not Field.CanModify;
    FCheckBox.Checked := AnsiCompareText(Field.AsString, ValueUnchecked) <> 0
  end
  else
  begin
    FCheckBox.State := cbGrayed;
    FCheckBox.ReadOnly := True;
  end;
end;
Additional InformationChanges:
procedure TJvCheckBoxDataConnector.RecordChanged;
begin
  if Field.IsValid and (ValueChecked <> '') and (ValueUnchecked <> '') then
  begin
    FCheckBox.ReadOnly := not Field.CanModify;
    if not Field.IsNull then
      FCheckBox.Checked := AnsiCompareText(Field.AsString, ValueUnchecked) <> 0
    else
      FCheckBox.State := cbGrayed;
  end
  else
  begin
    FCheckBox.State := cbGrayed;
    FCheckBox.ReadOnly := True;
  end;
end;
TagsNo tags attached.

Activities

AHUser

2008-10-24 13:56

developer   ~0014896

Added to SVN head.

Issue History

Date Modified Username Field Change
2008-10-23 23:28 ahotko New Issue
2008-10-24 13:56 AHUser Status new => resolved
2008-10-24 13:56 AHUser Fixed in Version => Daily / SVN
2008-10-24 13:56 AHUser Resolution open => fixed
2008-10-24 13:56 AHUser Assigned To => AHUser
2008-10-24 13:56 AHUser Note Added: 0014896