unpublished dbedit.text property, dbedit show text at runtime only when it needs to (bug #1243)

git-svn-id: trunk@7853 -
This commit is contained in:
jesus 2005-09-29 18:20:55 +00:00
parent e8f011bf1e
commit abc306261e
3 changed files with 11 additions and 2 deletions

View File

@ -142,6 +142,7 @@ Type
Operation: TOperation); override;
function EditCanModify: Boolean; override;
function GetEditText: string; override;
procedure Change; override;
procedure Reset; override;
@ -180,7 +181,6 @@ Type
property ShowHint;
property TabOrder;
property TabStop;
property Text;
property Visible;
property OnChange;
property OnClick;

View File

@ -182,6 +182,15 @@ begin
Result := FDataLink.Edit;
end;
function TDBEdit.GetEditText: string;
begin
if not (csDesigning in ComponentState) and not FDatalink.Active then begin
Result := '';
exit;
end;
Result:=inherited GetEditText;
end;
procedure TDBEdit.Change;
begin
//need to override this to make sure the datalink gets notified

View File

@ -91,7 +91,6 @@ type
function AddEditFormat(const Value: string; Active: Boolean): string;
function RemoveEditFormat(const Value: string): string;
function FindLiteralChar (MaskOffset: Integer; InChar: Char): Integer;
function GetEditText: string;
function GetMasked: Boolean;
function GetMaskText: string;
function GetMaxLength: Integer;
@ -118,6 +117,7 @@ type
procedure DoEnter; override;
procedure DoExit; override;
procedure Reset; virtual;
function GetEditText: string; virtual;
function GetFirstEditChar: Integer;
function GetLastEditChar: Integer;
function GetNextEditChar(Offset: Integer): Integer;