Call inherited double click of custom Stringgrid from popup menu item
Posted on 2007-04-04
Here is one for you all.
I have a custom component based on a TStringGrid.
Obviously there is a lot more to the code below but this is all I am questioning.
TMyGrid = class( TStringGrid)
procedure gridDblClick( Sender: TObject);
constructor create( pOwner: TComponent); override;
procedure TObjectAdvStringGrid.gridDblClick( Sender: TObject);
// Do Something
constructor TObjectAdvStringGrid.create( pOwner: TComponent);
// create based on standard
inherited create( pOwner);
// define defaults
onDblClick := gridDblClick;
Now I have dropped the component onto the form, and hooked up a popupmenu to the grid.
I have a menu option I would like to just tell the grid to double click itself on its current row.
(basically I want the user to have the option of double clicking the grid themselves or to right click and choose the option from the menu)
How can I pass this through?
I tried putting another double click event on the form in the hope that the menu option could just call the double click event, which would in turn fire off the inherited, but nada.
procedure TForm1.miViewClick( sender: TObject);
procedure TForm1.MyFormsGridDblClick(Sender: TObject);
What small thing am I missing?