Tema: OnKeyDown
Ver Mensaje Individual
  #5  
Antiguo 28-06-2011
Avatar de olbeup
olbeup olbeup is offline
Miembro
 
Registrado: jul 2005
Ubicación: Santiago de la Ribera (España)
Posts: 685
Reputación: 19
olbeup Va camino a la fama
Cita:
procedure Tfcotizacion.Remplazar1Click(Sender: TObject);
var cap:string;
n:integer;

begin

cap:= popupmenu1.Items.Items[0].Caption;
stringgrid1.Cells[fcotizacion.col,row]:=cap;
fcotizacion.OnKeyDown(sender,VK_CANCEL,//que va aqui??);


end;
Que tal éste código modificado
Código Delphi [-]
procedure TFCotizacion.Remplazar1Click(Sender: TObject);
var
  Cap: String;
  N:Integer;
  Key: Word;
begin
  Key := VK_CANCEL;
  Cap := PopupMenu1.Items.Items[0].Caption;
  StringGrid1.Cells[FCotizacion.Col, FCotizacion.Row] := Cap;
  FCotizacion.OnKeyDown(Sender, Key, []);
end;

Un saludo.
Responder Con Cita