Autor Beitrag
Coder
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1383
Erhaltene Danke: 1

WinXP
D2005 PE
BeitragVerfasst: Mo 10.04.06 22:04 
Hi
Ich hab mich schon hier im Forum, DP, bei Google und bei MSDN umgeschaut aber bin nicht fündig geworden.
Gibt es eine Funktion mit der man die Position des Eingabecursors in einem RichEdit oder JvRichEdit in Pixeln bekommt?
Ansonsten muss ich das wohl mit etwas rumkopieren und ReziseRequest lösen. :gruebel:
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Mo 10.04.06 22:17 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.Timer1Timer(Sender: TObject);
begin
  Caption := IntToStr(Mouse.CursorPos.X) + ',' + IntToStr(Mouse.CursorPos.Y);
end;
Coder Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1383
Erhaltene Danke: 1

WinXP
D2005 PE
BeitragVerfasst: Mo 10.04.06 22:21 
Danke! :)
Aber ich mein ja den Eingabecursor/Prompt im RichEdit.
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Mo 10.04.06 22:41 
Hallo,

so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
var pos : TPoint;
begin
  RichEdit.Perform(EM_POSFROMCHAR,integer(@pos),RichEdit.SelStart);
  showmessage('x: '+IntToStr(pos.x)+'    y: '+IntToStr(pos.y));

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
Coder Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1383
Erhaltene Danke: 1

WinXP
D2005 PE
BeitragVerfasst: So 23.04.06 21:13 
Danke! geht :)