S
szhhp
Unregistered / Unconfirmed
GUEST, unregistred user!
我正在学习VCL 下面是简单的继承TCustomDBGrid建立的TCustomDBGrid1(学习实验用)
unit CustomDBGrid1;
interface
uses
Windows, Messages, SysUtils, Classes, Controls, Grids, DBGrids;
type
TCustomDBGrid1 = class(TCustomDBGrid) //其实下面的代码和TDBGIRD一样,只是改了类名
public
property Canvas;
property SelectedRows;
published
property Align;
property Anchors;
property BiDiMode;
property BorderStyle;
property Color;
property Columns stored False; //StoreColumns;
property Constraints;
property Ctl3D;
property DataSource;
property DefaultDrawing;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property FixedColor;
property Font;
property ImeMode;
property ImeName;
property Options;
property ParentBiDiMode;
property ParentColor;
property ParentCtl3D;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property ReadOnly;
property ShowHint;
property TabOrder;
property TabStop;
property TitleFont;
property Visible;
property OnCellClick;
property OnColEnter;
property OnColExit;
property OnColumnMoved;
property OnDrawDataCell; { obsolete }
property OnDrawColumnCell;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEditButtonClick;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnStartDock;
property OnStartDrag;
property OnTitleClick;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('ggggg', [TCustomDBGrid1]);
end;
end.
问题来了,标准的DBGRID在设计时双击它可以弹出一窗口,用来编辑列,
可以上继承的这个,安装后使用,设计时双击却不能弹出窗口,而是转到
代码编辑区的ONCELLCLICK事件的编辑处,为什么?谢谢!
unit CustomDBGrid1;
interface
uses
Windows, Messages, SysUtils, Classes, Controls, Grids, DBGrids;
type
TCustomDBGrid1 = class(TCustomDBGrid) //其实下面的代码和TDBGIRD一样,只是改了类名
public
property Canvas;
property SelectedRows;
published
property Align;
property Anchors;
property BiDiMode;
property BorderStyle;
property Color;
property Columns stored False; //StoreColumns;
property Constraints;
property Ctl3D;
property DataSource;
property DefaultDrawing;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property FixedColor;
property Font;
property ImeMode;
property ImeName;
property Options;
property ParentBiDiMode;
property ParentColor;
property ParentCtl3D;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property ReadOnly;
property ShowHint;
property TabOrder;
property TabStop;
property TitleFont;
property Visible;
property OnCellClick;
property OnColEnter;
property OnColExit;
property OnColumnMoved;
property OnDrawDataCell; { obsolete }
property OnDrawColumnCell;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEditButtonClick;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnStartDock;
property OnStartDrag;
property OnTitleClick;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('ggggg', [TCustomDBGrid1]);
end;
end.
问题来了,标准的DBGRID在设计时双击它可以弹出一窗口,用来编辑列,
可以上继承的这个,安装后使用,设计时双击却不能弹出窗口,而是转到
代码编辑区的ONCELLCLICK事件的编辑处,为什么?谢谢!