Autor Beitrag
Lord_dw
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44

WinVista
BDS2006
BeitragVerfasst: Mi 17.09.03 13:24 
Wie zählt man die Anschläge in einem Textfeld (Memo)?

Danke im Vorraus!
focus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 187

XP, 2k, 98, Me
D6 Prof
BeitragVerfasst: Mi 17.09.03 13:42 
*g* lustiger name für den thread :P
du stellst dich auf das onkeypressed event des memos und zählst bei jedem zeichen einen counter hoch... und wenn du dann noch wissen willst in welcher zeit das war startest du einfach beim ersten anschlag einen counter...

gruss
michael
Lord_dw Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44

WinVista
BDS2006
BeitragVerfasst: Mi 17.09.03 13:58 
Und in welchem Event zählt man dann herunter, wenn man Text löscht?
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Mi 17.09.03 14:01 
Im selben, du musst nur für Entf- und Rück-Taste den Tasten-Code finden, ich glaube in den FAQs steht irgendwo eine Liste mit den Codes. Aber ehrlich gesagt, weiß ich gerade nicht mehr, was Du machen willst :shock:
maximus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 896

Win XP, Suse 8.1
Delphi 4/7/8 alles prof
BeitragVerfasst: Mi 17.09.03 14:08 
HI

entweder du willst die anschläge zählen, dann musst du entf und backspace mitzählen oder du willst die zeichen im memo zählen, dann machst du einfach 'length(memo1.text);'

nicht war?

_________________
mfg.
mâximôv
JustusJonas
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 222



BeitragVerfasst: Mi 17.09.03 14:43 
maximus hat folgendes geschrieben:
HI

entweder du willst die anschläge zählen, dann musst du entf und backspace mitzählen oder du willst die zeichen im memo zählen, dann machst du einfach 'length(memo1.text);'

nicht war?


RISCHDISCH!!

Greetz
Lord_dw Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44

WinVista
BDS2006
BeitragVerfasst: Do 18.09.03 16:02 
Danke, und wie kann ich einen markierten Text zählen lassen?
ShadowThief
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 278



BeitragVerfasst: Do 18.09.03 16:51 
ausblenden Delphi-Quelltext
1:
Length(Memo1.SelText)					


shadow.