Autor Beitrag
XPert
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 129

Windows 98/00/Me/XP
D6 Pers
BeitragVerfasst: Sa 28.09.02 23:04 
Hi! Ich hab noch so 'ne doofe anfängerfrage:
Ich habe da ein RichEdit in meinem Form, die Lines haben den wert:
<html>
<head>|</head>
<body></body>
</html>
Ich hab für den cursor/pointer das zeichen: |
jetzt mal eingefügt! da steht also der pointer von richEdit. wie kann ich das ganze per button1 druck so machen, das an die stelle des pointers z.B. <title></title> eingefügt wird?

_________________
MfG Fabian Schweers :lol:
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Sa 28.09.02 23:16 
Hallo,

ganz einfach so:
ausblenden Quelltext
1:
RichEdit1.SelText := '<title></title>';					

Über SelText kannst du den Markierten Text auslesen oder setzen. Die Eingabemarke stellt den Markierten Text (der länge 0) dar. Deshalbt wird der Text an der Stelle eingefügt, wo die Eingabemarke steht. Es sein denn es ist wirklich Text Markiert, der wird dann ersetzt.

Gruß
Klabautermann
XPert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 129

Windows 98/00/Me/XP
D6 Pers
BeitragVerfasst: Sa 28.09.02 23:20 
danke! :wink2:
du hast mein leben gerettet!

_________________
MfG Fabian Schweers :lol: