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 TStringGrid.Options[] - Wie ändere ich jene? (https://www.delphipraxis.net/65082-tstringgrid-options%5B%5D-wie-aendere-ich-jene.html)

Hirnsausen 12. Mär 2006 03:25


TStringGrid.Options[] - Wie ändere ich jene?
 
Grüße.

Ich schreibe an einem Programm, in welchem ich die Options eines TStringGrids ändern muß. Jedoch finde ich bis jetzt nicht raus, wie ich dies tun kann. Ich will zur Laufzeit die Eigenschaft goEditing von False auf True ändern, und versa. Eine Code-Zeile als Beispiel würde mir helfen.

marabu 12. Mär 2006 05:52

Re: TStringGrid.Options[] - Wie ändere ich jene?
 
Herzlich willkommen in der Delphi-PRAXiS, Sven.

Dein Stichwort für die Delphi Online-Hilfe ist Mengenoperatoren:

Delphi-Quellcode:
procedure TDemoForm.ModeButtonClick(Sender: TObject);
begin
  with StringGrid do
    if goEditing in Options
      then Options := Options - [goEditing]
      else Options := Options + [goEditing];
end;
Freundliche Grüße vom marabu

Hirnsausen 12. Mär 2006 12:23

Re: TStringGrid.Options[] - Wie ändere ich jene?
 
Marabou,

vielen Dank. Du hast mir damit echt geholfen. Diesen Weg kannte ich bisher nicht.

Dieses Thema kann hiermit beendet werden.


Alle Zeitangaben in WEZ +1. Es ist jetzt 13:25 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