I've been working on a lot of things, but I'm not sure what to do with it. inherited from FModelo1 has in addition to the inheritance of the OnCellClick event of FModelo1 its own CellClick event added when clicked.
This is not happening because the event is being replaced by the event of MHodel1
I'll try to put some of the code:
In the OnShow of FModelo1 I make several checks one of them is if there is a DBGrid on the Form, finding a DBGrid I will replace some events among them CellClick as an abbreviation:
...
TDBGrid(Components[i]).OnCellClick := DBGridCellClick;
...
DBGridCellClick is a procedure with a default path 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;
The non-FClients have their own CellClick with their particular routine, I can override on OnShow the FModelo1 procedure with the line:
JvDBUltimGridClientes.OnCellClick := JvDBUltimGridClientesCellClick;
But I wanted it roughly like this:
DBGridClientes.OnCellClick := DBGridCellClick + DBGridClientesCellClick;
In other words, it would take the events of FModelo1 + FClientes