0
I explain, I have Fmodelo1 that has several standard functions, among them I have the creation of the Oncellclick event of a Dbgrid that is inherited to all the Formularios created from Fmodelo1, works beauty, now I need for example that the Fclientes that is inherited from Fmodelo1 has beyond the Oncellclick event heritage of Fmodelo1 its own event Cellclick added when clicked.
This is not happening because the event is being replaced by the Fmodelo1 event
I’ll try to put part of the code:
In the Onshow of Fmodelo1 I do several checks one of them is if exite Dbgrid in the Form, finding a Dbgrid I replace some events among them the Cellclick as abyss:
...
TDBGrid(Components[i]).OnCellClick := DBGridCellClick;
...
Dbgridcellclick is a Procedure with a standard routine for all Forms:
procedure TFmodelo1.DBGridCellClick(Column: TColumn);
begin
if Column.PickList.Count > 0 then
begin
keybd_event(VK_F2, 0, 0, 0);
keybd_event(VK_F2, 0, KEYEVENTF_KEYUP, 0);
keybd_event(VK_MENU, 0, 0, 0);
keybd_event(VK_DOWN, 0, 0, 0);
keybd_event(VK_DOWN, 0, KEYEVENTF_KEYUP, 0);
keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0);
end;
end;
There in Fclientes has its own Cellclick with its particular routine, I can cancel in the Onshow the Fmodelo1 process with the line:
JvDBUltimGridClientes.OnCellClick := JvDBUltimGridClientesCellClick;
But I kind of wanted it to be something like this:
DBGridClientes.OnCellClick := DBGridCellClick + DBGridClientesCellClick;
In other words, he would take the events of Fmodelo1 + Fclientes
Post your code for a more complete answer.
– Roberto de Campos
I’m going to try to put part of it, because it’s kind of complex
– Marcelo