Autor Beitrag
Seraph
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 163

Windows.:siXPack:.
Delphi7 Professional
BeitragVerfasst: Di 07.02.06 12:51 
Hi Leute,

Ihr kennt doch sicherlich alle den blöden blinkenden Cursor, der angiebt, vor oder nach welchem Zeichen man sich in einem Textfeld befindet?!?

Der muss weg! Ich will in einem RichEdit einfach nur einen ReadOnly Text ausgeben ohne BlinkeStrich!!!

Ist das überhaupt möglich, den weg zu bekommen???

Danke im Voraus
Seraph


Moderiert von user profile iconGausi: Topic aus Delphi Language (Object-Pascal) / CLX verschoben am Di 07.02.2006 um 14:16
wolke
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 240



BeitragVerfasst: Di 07.02.06 13:23 
ich hab da so einen codeschnippsel...

ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure HideCursor;
begin
 CreateCaret(handle,0,1,1);
end;


jeweils im OnEnter bzw. OnClick-handler verwenden, probier mal rum.
Seraph Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 163

Windows.:siXPack:.
Delphi7 Professional
BeitragVerfasst: Di 07.02.06 13:57 
hmm...irgendwie passiert da garnichts! :nixweiss:
digi_c
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1905

W98, XP
D7 PE, Lazarus, WinAVR
BeitragVerfasst: Di 07.02.06 14:04 
Mag sein das der störrt aber er entspricht nunmal den Standart. Du wirst sicherlich das Edit nehmen, damit sich deine Anwender daraus auch schnell Text kopieren können. Ohne den Cursor könnte man nicht sagen wie weit man markiert hat, gell.
wolke
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 240



BeitragVerfasst: Di 07.02.06 14:07 
also habs gerade testweise nochmal probiert, bei mir klappt es. jeweils im OnClick-Handler eingetragen (habe es mit Memo und Edit ausprobiert).

@digic: ich habe das in meinem letzten projekt verwendet, um mir mit hilfe von editfeldern "ins clipboard kopierbare"/markierbare labels zu basteln. da ist es nicht so wichtig wo der cursor ist, sieht eher unschön aus.
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Di 07.02.06 14:15 
Eine Möglichkeit ist, dass Richedit auf ein Panel zu setzen, und Panel1.Enabled := False zu setzen. Ist vielleicht nicht besonders schöner Programmierstil, aber das funktioniert einwandfrei ;-)
Copy&Paste ist damit natürlich auch ausgeschaltet.

_________________
We are, we were and will not be.
Seraph Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 163

Windows.:siXPack:.
Delphi7 Professional
BeitragVerfasst: Di 07.02.06 16:04 
Ein wirklich guter Einwand Gausi!

Funzt einwandfrei!

Danke und Gruß
Seraph

_________________
Wer früher stirbt ist länger tot!
wolke
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 240



BeitragVerfasst: Di 07.02.06 17:16 
dann kann man das richedit doch gleich auf disabled setzen?
Seraph Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 163

Windows.:siXPack:.
Delphi7 Professional
BeitragVerfasst: Mi 08.02.06 08:53 
user profile iconwolke hat folgendes geschrieben:
dann kann man das richedit doch gleich auf disabled setzen?


Nein, da dann das RichEdit auch so aussieht!
Die Schrift wird einfach grau! Aber Farben sind bei diesem Projekt sehr wichtig.

Grüße
Seraph