Bael_Balzac
20-05-2011, 23:19:28
goEditing esta en True
goTab esta en True
No puedo editar las celdas en tiempo de ejecucion
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids;
type
TForm1 = class(TForm)
StringGrid1: TStringGrid;
procedure StringGrid1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.StringGrid1Click(Sender: TObject);
begin
with StringGrid1 do
begin
Cells[0,0] := 'Nombre';
Cells[1,0] := 'Apellido paterno';
Cells[2,0] := 'Apellido materno';
Cells[3,0] := 'Nota Examen 1';
Cells[4,0] := 'Nota Examen 2';
Cells[0,1] := 'Pablo';
Cells[1,1] := 'Garcia';
Cells[2,1] := 'Martinez';
Cells[3,1] := '40';
Cells[4,1] := '36';
Cells[0,2] := 'Maria';
Cells[1,2] := 'Sanchez';
Cells[2,2] := 'Palazon';
Cells[3,2] := '50';
Cells[4,2] := '60';
Cells[0,3] := 'Carmen';
Cells[1,3] := 'Perez';
Cells[2,3] := 'Guillen';
Cells[3,3] := '70';
Cells[4,3] := '60';
end;
end;
end.
goTab esta en True
No puedo editar las celdas en tiempo de ejecucion
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids;
type
TForm1 = class(TForm)
StringGrid1: TStringGrid;
procedure StringGrid1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.StringGrid1Click(Sender: TObject);
begin
with StringGrid1 do
begin
Cells[0,0] := 'Nombre';
Cells[1,0] := 'Apellido paterno';
Cells[2,0] := 'Apellido materno';
Cells[3,0] := 'Nota Examen 1';
Cells[4,0] := 'Nota Examen 2';
Cells[0,1] := 'Pablo';
Cells[1,1] := 'Garcia';
Cells[2,1] := 'Martinez';
Cells[3,1] := '40';
Cells[4,1] := '36';
Cells[0,2] := 'Maria';
Cells[1,2] := 'Sanchez';
Cells[2,2] := 'Palazon';
Cells[3,2] := '50';
Cells[4,2] := '60';
Cells[0,3] := 'Carmen';
Cells[1,3] := 'Perez';
Cells[2,3] := 'Guillen';
Cells[3,3] := '70';
Cells[4,3] := '60';
end;
end;
end.