Ver Mensaje Individual
  #2  
Antiguo 18-12-2007
[maeyanes] maeyanes is offline
Capo de los Capos
 
Registrado: may 2003
Ubicación: Campeche, México
Posts: 2.732
Reputación: 24
maeyanes Va por buen camino
Hola...

Tienes varias formas de hacer esto...

Una es redefiniendo el método UpdateActions de TForm...

Código Delphi [-]
TForm1 = class(TForm)
  // cortado...
protected
  procedure UpdateActions; override;
end;

implementation

procedure TForm1.UpdateActions;
begin
  Menu1Item1.Enabled := not Table1.IsEmpty;
  Menu1Item2.Enabled := not Table1.IsEmpty
end;

Otra posibilidad sería al insertar o eliminar registros de la tabla usando sus eventos AfterInsert y AfterDelete...


Saludos...
Responder Con Cita