Autor Beitrag
D. Annies
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1843

windows 7
D6 Enterprise, D7 Pers und TD 2006
BeitragVerfasst: Sa 14.08.10 16:25 
Hi, Delpher,
Ich möchte, dass nach der Popup-Auswahl "neuer Eintrag" eine neue Zeile erzeugt wird
UND
dass der Cursor dort in der ersten Spalte positioniert wird.

Ich habe folgenden Code - der Cursor wird leider noch nicht positioniert.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
  tntstringgrid2.Options := tntstringgrid2.Options + [goediting];
  showmessage('Neuen Namen bitte am Ende der Tabelle eintragen');
  tntstringgrid2.RowCount := tntstringgrid2.RowCount+1;
  tntstringgrid2.Selection := TGridRect(Bounds(0,tntstringgrid2.RowCount,0,tntstringgrid2.RowCount));


Danke für eure Hilfe,
Detlef

_________________
ut vires desint, tamen est laudanda voluntas
Stundenplan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 128
Erhaltene Danke: 32

Win 7
Delphi 7 Pers., C# (VS 2010 Express)
BeitragVerfasst: Sa 14.08.10 17:22 
Hi,

das dürfte dir weiterhelfen!

Viele Grüße,
Stundenplan.
D. Annies Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1843

windows 7
D6 Enterprise, D7 Pers und TD 2006
BeitragVerfasst: So 15.08.10 09:07 
Hi, Stundenplan,
leider nicht, ich bekomme noch einen Error at position 00000000.
Abwarten ...
Danke erstmal,
Detlef

_________________
ut vires desint, tamen est laudanda voluntas
Stundenplan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 128
Erhaltene Danke: 32

Win 7
Delphi 7 Pers., C# (VS 2010 Express)
BeitragVerfasst: So 15.08.10 10:58 
Der Fehler kommt davon, dass in der Zelle noch kein Text steht. Sobald Text drinsteht, läufts.
D. Annies Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1843

windows 7
D6 Enterprise, D7 Pers und TD 2006
BeitragVerfasst: So 15.08.10 11:54 
Nun, es ist ja auch noch eine leere Zeile ..
mit der folgenden Ergänzung kann ich die richtige Zelle markieren, aber es soll noch dahin gescrollt werden.
Wie geht das (automatische Scrollen) denn?

_________________
ut vires desint, tamen est laudanda voluntas
Stundenplan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 128
Erhaltene Danke: 32

Win 7
Delphi 7 Pers., C# (VS 2010 Express)
BeitragVerfasst: So 15.08.10 16:29 
Welche Ergänzung? :lupe:
Du könntest die Zelle ja auch einfach mit nem Leerzeichen füllen. :wink:
@Scrollen: Nach 1min Google aus der DP:
ausblenden Delphi-Quelltext
1:
2:
Stringgrid1.TopRow  := StringGrid1.Selection.Top;
Stringgrid1.LeftCol := StringGrid1.Selection.Left;

Viele Grüße,
Stundenplan.
D. Annies Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1843

windows 7
D6 Enterprise, D7 Pers und TD 2006
BeitragVerfasst: So 15.08.10 18:32 
Wow, vielen Dank für deine Mühe - da warst du erfolgreicher beim Suchen als ich - und
so ist es ok.
P.S. Ich hatte vergessen, dir die Änderung zu senden.
Danke, Detlef

_________________
ut vires desint, tamen est laudanda voluntas