yo lo hago asi
[delphi]
declaras la funcion en:
Código Delphi
[-]private
function botones(WBoton:Integer):Integer;
y despues
Código Delphi
[-]
function Tform_capt_pro.botones(Wboton:Integer):Integer;
begin
if WBoton=0 then begin
self.pgc1.Enabled:=True;
self.btn_guardar.Enabled:=True;
self.btn_insertar.Enabled:=False;
end;
if WBoton='insertar then begin
self.pgc1.Enabled:=True;
self.btn_guardar.Enabled:=True;
self.btn_insertar.Enabled:=False;
end;
end;
y para llamarla