Answer the question
In order to leave comments, you need to log in
How to make a predefined event handler in Delphi?
The DBgrid (TDBGridEh) has a column (TColumnEh) that has an OnDataHintShow event.
There is a created class TDynamicGrid = class(TDBGridEh), it describes the ShowPanel procedure.
How to make it so that by default, the ShowPanel procedure is called for the desired column on the OnDataHintShow event?
Those. it was not necessary to prescribe it every time, but it worked for all Grids of this class.
constructor TDynamicGrid.Create(AOwner: TComponent);
var q: TDBgridEhDataHintShowEvent;
begin
inherited;
// FieldPanel - параметр который содержит имя колонки, для которой предопределяем событие.
self.FieldColumns[self.FieldPanel].OnDataHintShow := ..............................
end;
self.FieldColumns[self.FieldPanel].OnDataHintShow := self.ShowPanel()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question