Finalize version.
[marekmrva_bc.git] / CustomStringGridClass.pas
blobdc10c7fcdf8bdf41409f51ceb0ea9d622260ed5a
1 unit CustomStringGridClass;
3 interface
5 uses
6 ResourcesClass,
7 Classes, Grids;
9 type
11 { TCustomStringGrid }
13 TCustomStringGrid = class(TStringGrid)
14 private
15 pSelected: Boolean;
16 procedure pOnEnter(Sender: TObject); virtual;
17 procedure pOnExit(Sender: TObject); virtual;
18 protected
19 property Selected: Boolean read pSelected write pSelected;
20 public
21 constructor Create(AOwner: TComponent); override;
22 end;
24 implementation
26 // ************************************************************************** //
27 // * TCustomStringGrid implementation * //
28 // ************************************************************************** //
30 procedure TCustomStringGrid.pOnEnter(Sender: TObject);
31 begin
32 pSelected := True;
33 end;
35 procedure TCustomStringGrid.pOnExit(Sender: TObject);
36 begin
37 pSelected := False;
38 end;
40 constructor TCustomStringGrid.Create(AOwner: TComponent);
41 begin
42 inherited Create(AOwner);
43 DoubleBuffered := True;
44 FixedCols := 0;
45 FixedRows := 0;
46 OnEnter := pOnEnter;
47 OnExit := pOnExit;
48 Canvas.Font.Name := FONT_DEFAULT_NAME;
49 Canvas.Font.Size := FONT_DEFAULT_SIZE;
50 DefaultRowHeight := FONT_DEFAULT_HEIGHT;
51 end;
53 end.