1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
| TBtnsHints = class (TPersistent)
private
FOwner : TColoredBindNavigator;
FBtnHints : Array [0..11] of String;
function GetHint(const index : Integer) : String;
function HintisStored(const index: Integer) : Boolean;
procedure SetHint(const index : Integer; const Value : String) ;
public
constructor Create(aOwner : TColoredBindNavigator);
destructor Destroy; override;
published
property First : String index 0 read GetHint write SetHint stored HintisStored;
property Prior : String index 1 read GetHint write SetHint stored HintisStored;
property Next : String index 2 read GetHint write SetHint stored HintisStored;
property Last : String index 3 read GetHint write SetHint stored HintisStored;
property Insert : String index 4 read GetHint write SetHint stored HintisStored;
property Delete : String index 5 read GetHint write SetHint stored HintisStored;
property Edit : String index 6 read GetHint write SetHint stored HintisStored;
property Post : String index 7 read GetHint write SetHint stored HintisStored;
property Cancel : String index 8 read GetHint write SetHint stored HintisStored;
property Refresh : String index 9 read GetHint write SetHint stored HintisStored;
property ApplyUpdate : String index 10 read GetHint write SetHint stored HintisStored;
property CancelUpdate : String index 11 read GetHint write SetHint stored HintisStored;
end;
{ TBtnsHints }
constructor TBtnsHints.Create(aOwner: TColoredBindNavigator);
begin
FOwner:=aOwner;
// for var i:=0 to 12 do FBtnHints[i]:='';
end;
destructor TBtnsHints.Destroy;
begin
inherited;
end;
function TBtnsHints.GetHint(const index: Integer): String;
begin
result:=FBtnHints[index];
end;
function TBtnsHints.HintisStored(const index: Integer) : Boolean;
begin
Result := FBtnHints[index]<>EmptyStr;
end;
procedure TBtnsHints.SetHint(const index: Integer; const Value: String);
begin
FBtnHints[index]:=Value;
end; |
Partager