Autor Beitrag
Cathleen
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16



BeitragVerfasst: Do 17.08.06 19:53 
Hallo,

ich hoffe ihr könnt mir mal wieder aus meiner Unwissenheit helfen.

Ich möchte eine in einer TMemo Feld, auf Knopfdruck, den Cursor in die zweite Zeile setzen. Ich habe in der Delphi Hilfe schon was über CursorPos gelesen. Ich weiß nur nichts damit anzufangen. Wie setzt ich das ein und wie kann ich die Zeile im TMemo Feld festlegen?

Ich hoffe jemand von euch kennt sich damit ein bisschen besser aus.

Danke!

MFG
Cathleen
Danniolo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 693



BeitragVerfasst: Do 17.08.06 20:00 
Hm, wofür brauchst du das denn?
Evtl. würde nämlich auch das hier passen.
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Do 17.08.06 20:02 
[NICHT BEACHTEN]Geht das maybe wenn man ItemIndex einen Wert zuweist?[/NICHT BEACHTEN]

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
Cathleen Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16



BeitragVerfasst: Do 17.08.06 20:25 
Danke für eure schnelle Hilfe.

Leider hat es nicht funktioniert.

Ich füge per Knopfdruck 3 Zeilen in ein Memo Feld ein. Nachdem die Zeilen eingefügt sind, soll der Cursor in der 2 Zeile stehen, damit man gleich noch was hinzufügen kann.

AMemo.Perform(EM_SCROLLCARET, 1, 0);
Das sieht ja garnicht mal so schlecht aus, aber der Cursor steht da nicht.

MFG
Cathleen
Cathleen Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16



BeitragVerfasst: Do 17.08.06 20:33 
Sorry, mein Fehler!!!!

Natürlich muss man auch noch das SetFokus setzen ;-)

Also, so funktioniert es:

AMemo.SelStart:=AMemo.Perform(EM_LineIndex,1,0);
AMemo.SetFokus;

//Der Cursor steht nun in der 2ten Zeile


MFG
Cathleen