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 StringGrid -> GoEditing (https://www.delphipraxis.net/95576-stringgrid-goediting.html)

Todd 9. Jul 2007 20:07


StringGrid -> GoEditing
 
Hallo zusammen,

kann man in einem StringGrid einzelne Felder für eine Bearbeitung freigeben und den Rest nicht?
Oder kann man das über den Punkt "Options"->"GoEditing" nur für das gesamte StringGrid beeinflussen?

Danke

Hawkeye219 9. Jul 2007 20:30

Re: StringGrid -> GoEditing
 
Hallo,

du kannst in der Behandlungsroutine für das Ereignis Delphi-Referenz durchsuchenTStringGrid.OnSelectCell das Flag goEditing setzen oder löschen:

Delphi-Quellcode:
procedure TForm1.Grid1SelectCell (Sender: TObject; ACol, ARow: Integer;
  var CanSelect: Boolean);
begin
  if ((ACol = 3) and (ARow = 4)) then
    Grid1.Options := Grid1.Options - [goEditing]
  else
    Grid1.Options := Grid1.Options + [goEditing];
end;
Gruß Hawkeye

Todd 9. Jul 2007 22:04

Re: StringGrid -> GoEditing
 
Stimmt, so geht das natürlich am einfachsten.

Danke für deine Hilfe

Grüße
Todd


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