Autor Beitrag
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Mo 26.12.05 19:31 
Hallo Leute !

Hätte Jemand für Mich einen Tip wie Ich folgendes lösen könnte. Und zwar möchte Ich das Wort herausfinden was unter dem Cursor steht. Das heißt mit RichEdit1.CaretPos.X hätte Ich ja die Cursorposition.

Jetzt müsste Ich irgendwie prüfen das wenn der Cursor im Wort steht wo jeweils Rechts und Links das Leerzeichen steht und hätte somit das Wort.

Wie könnte man das Problem angehen ?
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mo 26.12.05 19:36 
Wenn ich Dich richtig verstanden habe, dann wäre SelStart die bessere Eigenschaft für Dich. Damit bekommst Du die Position nicht in Form von Pixeln, sondern in Form von Zeichen. Damit kannst Du dann einfach in dem String nach vorne und hinten suchen und bekommst das entsprechende Wort. :-)

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
Blackheart666 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Mo 26.12.05 19:44 
Danke Christian S. dann werd Ich mal das mit SelStart probieren.