[Overview][Resource strings][Constants][Types][Classes][Procedures and functions][Index] |
Override this to implement field bounds.
Source position: tiObject.pas line 368
protected procedure TtiObject.DoGetFieldBounds( |
const AFieldName: string; |
var MinValue: Integer; |
var MaxValue: Integer; |
var HasBounds: Boolean |
); virtual; overload; |
const AFieldName: string; |
var MinValue: Extended; |
var MaxValue: Extended; |
var HasBounds: Boolean |
); virtual; overload; |
const AFieldName: string; |
var MinValue: TDateTime; |
var MaxValue: TDateTime; |
var HasBounds: Boolean |
); virtual; overload; |
procedure TPerson.DoGetFieldBounds(const AFieldName: String; var MinValue, MaxValue: Integer; var HasBounds: Boolean); begin if AFieldName = 'Name' then begin // Name property limited to max length of 25 characters HasBounds := True; MinValue := 1; MaxValue := 25; end else if AFieldName = 'Age' then begin // Age property limited to a value between 1 and 120 HasBounds := True; MinValue := 1; MaxValue := 120; end else inherited DoGetFieldBounds(AFieldName, MinValue, MaxValue, HasBounds); end;