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, Cursor per Code ansteuern? (https://www.delphipraxis.net/77527-stringgrid-cursor-per-code-ansteuern.html)

Hallo_Thomas 20. Sep 2006 19:23


Stringgrid, Cursor per Code ansteuern?
 
Liste der Anhänge anzeigen (Anzahl: 1)
Hallo,

Mit welchen Befehl kann ich den Cursor in einem Stringgrid setzten?

ibp 20. Sep 2006 19:35

Re: Stringgrid, Cursor per Code ansteuern?
 
meintest du auf eine bestimmte zelle?

dann damit:
Delphi-Quellcode:
stringgrid1.Col:=2;
stringgrid1.Row:=3;
der cursor springt in die 4. zeile und in die 3. spalte. zeile und spalte fängt bei 0 an zu zählen!

Hallo_Thomas 20. Sep 2006 19:48

Re: Stringgrid, Cursor per Code ansteuern?
 
Genau das meine Ich!!!!!!!!!!!!!!

Dankeschön!!!!

Hallo_Thomas 20. Sep 2006 23:23

Re: Stringgrid, Cursor per Code ansteuern?
 
Liste der Anhänge anzeigen (Anzahl: 2)
Leider klappt der Befehl nicht richtig bei mir, wenn ich versuche von StringGrid1 zu StringGrid2 zu wechseln per KeyDown Ereignis!

So hab ich den Code den Code umgesetzt!

Delphi-Quellcode:
    (Form1.FindComponent('StringGrid'+IntToStr(iTag)) as TStringGrid).Col:=0;
    (Form1.FindComponent('StringGrid'+IntToStr(iTag)) as TStringGrid).Row:=1;

Lannes 21. Sep 2006 06:28

Re: Stringgrid, Cursor per Code ansteuern?
 
Hallo,

vermute das Du noch den Focus auf das StringGrid setzen musst:
Delphi-Quellcode:
(Form1.FindComponent('StringGrid'+IntToStr(iTag)) as TStringGrid).SetFocus;


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