Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Eintippen in StringGrid (https://www.delphipraxis.net/76881-eintippen-stringgrid.html)

mfs 11. Sep 2006 15:54


Eintippen in StringGrid
 
Hallo,

könnte mir bitte jemand sagen, was ich an einem StringGrid einstellen soll, damit ich in den Feldern etwas eingeben/eintippen kann?

Also beim Einfügen eines neuen StringGrid ist es deaktiviert, etwas rein zu schreiben!

mfs

marabu 11. Sep 2006 15:59

Re: Eintippen in StringGrid
 
Hallo,

schau mal im OI unter Options (goEditing).

Grüße vom marabu

mfs 11. Sep 2006 21:18

Re: Eintippen in StringGrid
 
Hi,

ich finde aber im Objektinspektor Options (goEditing) nicht!!

StringGrid erstelle ich dynamisch und diese Eigenschaft muss angeben.

Mein Code sieht so aus:

Delphi-Quellcode:

   if StringGridStr[i] = nil then
   begin
      StringGridStr[i] := TStringGrid.Create(self);
      with StringGridStr[i] do
      begin
         Parent := GroupBoxBefragung[i];
         Name := 'StringGrid'+inttostr(i+1);
         FixedCols:=0;
         FixedRows:=0;
         ColCount:=2;
         RowCount:=10;
         DefaultColWidth:=200;
         Left := 200;
         Top := 62;
         Width:=441;
         Height:= 179;
         //Hier soll die Eigenschaft stehen, damit ich in StringGrid etwas eingeben kann! 
      end;
   end;

droppi 11. Sep 2006 22:11

Re: Eintippen in StringGrid
 
Also um das bei Options einzustellen musst du das so machen:
Delphi-Quellcode:
stringgrid[i].Options:=[goediting,....];
In die eckigen Klammern können denn nach dem Komma noch andere Optionen rein.

Cyberbob 11. Sep 2006 22:24

Re: Eintippen in StringGrid
 
ich würde
Delphi-Quellcode:
StringGrig[i].Options := StringGrid[i].Options + [goEditing];
schreiben. Ich hab mal einfah stringgrid.options := [goediting] geschrieben und damit alle anderen eigenschaften deaktiviert.

droppi 11. Sep 2006 22:55

Re: Eintippen in StringGrid
 
Stimmt das ist natürlich ne bessere Lösung.


Alle Zeitangaben in WEZ +1. Es ist jetzt 04:02 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz