Autor Beitrag
steppenwolf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Fr 02.07.04 06:40 
Morgen Leute,

ich dreh am Rad: Wieso kann ich das Stringgrid nicht verändern?? Ich erstelle ein vollständig neues Projekt, füge Stringgrid ein und folgenden Code:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
unit Unit1;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Grids;
type
  TForm1 = class(TForm)
    StringGrid1: TStringGrid;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private   { Private-Deklarationen }
  public    { Public-Deklarationen }
  end;

var Form1: TForm1;

implementation
{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);  (* Programm starten *)
var i:Integer;
begin
 with StringGrid1 do
 begin
  ColWidths[0] := 30;      (* Breite der Fixspalte verringern *)
  Cells[0,0] := 'Nr.';
  Cells[1,0] := 'Name';
  Cells[2,0] := 'Geburtsjahr';
  (* Fixspalte ausfüllen *)
  for i := 1 to RowCount-1 do Cells[0,i] := IntToStr(i);
  (* alle True-Optionseigenschaften zuweisen *)
  Options := [goFixedVertLine, goFixedHorzLine, goHorzLine, goVertLine,
              goRowMoving, goColSizing, goEditing, goTabs]
  end
end;

procedure TForm1.Button1Click(Sender: TObject);
begin close; end;

end.


Das ganze wird fehlerlos kompiliert, aber die Tabelle ist unverändert.

Danke für eure Hilfe,
steppenwolf.

Moderiert von user profile iconTino: Delphi-Tags hinzugefügt.
inselberg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 458



BeitragVerfasst: Fr 02.07.04 08:08 
delphi version?

hab deinen code 1 zu 1 übernommen ... und bei mir klappts

_________________
hans bist du das ?
steppenwolf Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Fr 02.07.04 11:20 
Hallo inselberg,

es ist Delphi 6.0. Ich habe den leisen Verdacht, dass eine Eigenschaft in meinem Objektmanager das verhindert. Welche das sein könnte, weiss ich leider nicht.

Gruss,
steppenwolf.
inselberg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 458



BeitragVerfasst: Fr 02.07.04 13:14 
user defined image
kannst ja mal vergleichen

_________________
hans bist du das ?