Ver Mensaje Individual
  #3  
Antiguo 15-11-2006
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.282
Reputación: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Una opción:

Código Delphi [-]
    //-----------------------------------------------------------
    // Mover el resto de filas hacia arriba
    procedure DeleteRow1(StringGrid: TStringGrid; ARow: Integer);
    var
      i: Integer;
    begin
      with StringGrid do
      begin
        // MOver una posicion hacia arriba el resto de líneas
        for i := ARow to RowCount - 2 do
          Rows[i].Assign(Rows[i + 1]);
        // Decrementar el número total de líneas
        RowCount := RowCount - 1
      end;
    end;
    //-----------------------------------------------------------


y otra opción:
Código Delphi [-]
  //-----------------------------------------------------------
    procedure DeleteRow2(StringGrid: TStringGrid; ARow: Integer);
    begin
      with THackStringGrid(StringGrid) do
        DeleteRow(ARow);
    end;
  //-----------------------------------------------------------

Te faltará (en el segundo caso) esta definición:

Código Delphi [-]
THackStringGrid = class(TStringGrid);
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita