Delphi-PRAXiS
Seite 2 von 2     12   

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 seltsames Phänomen im stringgrid ?!? (https://www.delphipraxis.net/24771-seltsames-phaenomen-im-stringgrid.html)

Sharky 27. Jun 2004 20:36

Re: seltsames Phänomen im stringgrid ?!?
 
Zitat:

Zitat von Mirilin
:...und wie wild damit umherfahren...

Aaaahhhh.... jetzt kommt der Fehler.

Sharky 27. Jun 2004 20:40

Re: seltsames Phänomen im stringgrid ?!?
 
*blubb*

Delphi-Quellcode:
procedure TForm1.StringGrid5SelectCell(Sender: TObject; ACol,
  ARow: Integer; var CanSelect: Boolean);
var
  myACol : Integer;
begin
  StringGrid5.OnSelectCell := nil; // Nicht das unsere OnSelectCell mehrfach läuft ;-)
  myAcol := Acol;
  CanSelect:=Not ((ACol=9) or (Acol=18) or (Acol=27));
  if not (CanSelect) then
  begin
    if (stringgrid5.col>acol) then
    begin
     stringgrid5.col:=Stringgrid5.col-2;
     DEC (myACol);
    end
    else
    begin
      stringgrid5.col:=Stringgrid5.col+2;
      Inc (myACol);
    end;
  end;
  label1.Caption:=inttostr(myacol);
  Application.ProcessMessages;
  StringGrid5.OnSelectCell := StringGrid5SelectCell; // Fertig. Jetzt darf sie wieder aktiv werden
end;
Jetzt sollte es aber gehen :gruebel: :cyclops:

richard_boderich 27. Jun 2004 22:14

Re: seltsames Phänomen im stringgrid ?!?
 
also sharky letzter code von dir funktioniert doch nich
bei mehrfachem mausklick auf die gesperrte zelle stimmt
zwar der colwert, jedoch ist die verbotene zelle dann mit
den gridcursor selectiert
hab nochmal im forum gesuch, und ne loesung die funktioniert gefunden , code
is glaube ich von keldorn
hier der link dazu

Link

richard_boderich 27. Jun 2004 22:27

Re: seltsames Phänomen im stringgrid ?!?
 
ok sorry, mein fehler, hier der link nochmal


Link


Alle Zeitangaben in WEZ +1. Es ist jetzt 04:10 Uhr.
Seite 2 von 2     12   

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