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

Veo que eres nuevo en estos foros, así que primero te doy la bienvenida y luego te invito a que leas la Guía de Estilo de estos foros (enlace arriba del banner )

También te pido que cuando publiques código fuente en estos foros, uses las etiquetas [ DELPHI ] [ /DELPHI ] (sin los espacios en blanco). De esta forma tu código se verá más presentable:

Código Delphi [-]
type
  TForm1 = class(TForm)
    Button1: TButton;
    Edit1: TEdit;
    SGNums: TStringGrid;
    Button2: TButton;
    Label1: TLabel;
    Label2: TLabel;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    nums: array of integer;
    Tam:integer;
    // row:integer;
    { Private declarations }
  public
    { Public declarations }
    rcount:integer;
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var valor:integer;
  //begin
  //if (row  i, j:Integer;
  Str:String;

begin
  valor:= StrToInt (Edit1.Text);
  setLength (nums,20);
  SGNums.Cells[1,1]:=Edit1.Text;
  SGNums.RowCount:=SGNums.RowCount+1;
  for j := 0 to (SGNums.Rows[i].Count - 1) do begin
    //SGNums.ColsCount:=SGNums.ColsCount+1
    //SGNums.ColCount;
    //SGNums.Row:= SGNums.Row+1;
  end;
end;

//edit1.setfocus;
procedure TForm1.FormCreate(Sender: TObject);
begin
  SGNums.Cells[0,0]:='Posicion';
  SGNums.Cells[1,0]:='Valor';

end;

end.

¿Ves la diferencia?


Saludos...
Responder Con Cita