KALEN

Top  Previous  Next

unit Kalen;

 

interface

 

uses SysUtils, WinTypes, WinProcs, Messages, Classes, Controls, Forms,

Graphics, Menus, StdCtrls, ExtCtrls, DB, DBTables, Mask, Buttons;

 

Type

TDateEdit = class(TDBEdit)

private

  FFieldType : TFieldType;

  function GetDataField: string; override;

protected

public

  constructor Create(AOwner: TComponent); override;

  destructor Destroy; override;

published

  property DataField: string read GetDataField write SetDataField;

  property DataSource: TDataSource read GetDataSource write SetDataSource;

  property AutoSelect;

  property AutoSize;

  property BorderStyle;

  property CharCase;

  property Color;

  property Ctl3D;

  property DragCursor;

  property DragMode;

  property Enabled;

  property Font;

  property MaxLength;

  property ParentColor;

  property ParentCtl3D;

  property ParentFont;

  property ParentShowHint;

  property PasswordChar;

  property PopupMenu;

  property ReadOnly: Boolean read GetReadOnly write SetReadOnly default False;

  property ShowHint;

  property TabOrder;

  property TabStop;

  property Visible;

  property OnChange;

  property OnClick;

  property OnDblClick;

  property OnDragDrop;

  property OnDragOver;

  property OnEndDrag;

  property OnEnter;

  property OnExit;

  property OnKeyDown;

  property OnKeyPress;

  property OnKeyUp;

  property OnMouseDown;

  property OnMouseMove;

  property OnMouseUp;

end;

 

implementation

 

constructor TDBEdit.Create(AOwner: TComponent);

begin

inherited Create(AOwner);

end;

 

destructor TDBEdit.Destroy;

begin

inherited Destroy;

end;

 

function TDateEdit.GetDataField: string;

begin

if FDataLink.Field.FieldType=ftDate then

   Result := FDataLink.FieldName else Result := ''

end;

 

end.