lcl: remove TDBCheckBox.ValueEqualsField. Use AnsiSameText instead

git-svn-id: trunk@28352 -
This commit is contained in:
blikblum 2010-11-19 20:26:31 +00:00
parent f645b173bc
commit 0bf716d4cf
2 changed files with 2 additions and 9 deletions

View File

@ -599,7 +599,6 @@ Type
procedure SetReadOnly(const AValue: Boolean);
procedure SetValueCheck(const AValue: string);
procedure SetValueUncheck(const AValue: string);
function ValueEqualsField(const AValue, AFieldText: string): boolean;
procedure CMGetDataLink(var Message: TLMessage); message CM_GETDATALINK;
protected
function GetFieldCheckState: TCheckBoxState; virtual;

View File

@ -85,9 +85,9 @@ begin
end else begin
Result:=cbGrayed;
FieldText:=FDatalink.Field.AsString;
if ValueEqualsField(FValueCheck,FieldText) then
if AnsiSameText(FValueCheck,FieldText) then
Result:=cbChecked
else if ValueEqualsField(FValueUncheck,FieldText) then
else if AnsiSameText(FValueUncheck,FieldText) then
Result:=cbUnchecked;
end;
end;
@ -151,12 +151,6 @@ begin
inherited EditingDone;
end;
function TDBCheckBox.ValueEqualsField(const AValue, AFieldText: string
): boolean;
begin
Result:=AnsiCompareText(AValue,AFieldText)=0;
end;
procedure TDBCheckBox.CMGetDataLink(var Message: TLMessage);
begin
Message.Result := PtrUInt(FDataLink);