Home
Top.Mail.Ru Yandeks.Metrika
Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Down

Again the question is related to RichEdit! Find similar branches


Man In Red   (2001-12-16 14:31) [0]

Help, pleaaasse!
In short, on the form are: RichEdit1 and RichEdit2 and Timer.
There is text in RichEdit1, and the timer every second selects one character in the text one by one, copies and pastes into RichEdit2.
How to make sure that when the last character in a line is highlighted, the timer automatically transfers the carriage to a new line in RichEdit1 and also puts the carriage on a new line in RichEdite2, and again selects one character in order until the characters end?
Thanks in advance!



KilkennyCat   (2001-12-17 01:48) [1]

was
Form1: TForm1;
a: longint;

implementation

{$ R * .DFM}

procedure TForm1.Timer1Timer (Sender: TObject);
was
b: longint;
begin
inc (a);
b: = rxrichedit1.SelStart;
rxrichedit1.SelStart: = a;
rxrichedit1.SelLength: = 1;
if b = rxrichedit1.SelStart then BASTAMANIAN!
end;

procedure TForm1.Button1Click (Sender: TObject);
begin
rxrichedit1.SelStart: = 0; // set the carriage to the beginning
rxrichedit1.SetFocus; // remove the focus from the button
timer1.Enabled: = true // run!
end;

Or did I misunderstand again? then the question is asked incorrectly.
This code has a glitch - it highlights the line feed character. To eliminate, you need to check whether the next character is a newline and if so, then two times inc (a)



Pages: 1 whole branch

Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Top





Memory: 0.54 MB
Time: 0.024 c
6-22271
Victor
2001-10-04 20:15
2002.01.08
there was no remote connection during the connection ????


3-21910
Wladimir
2001-12-04 08:01
2002.01.08
Number of entries in the table?


3-21948
andre_polt
2001-12-04 16:22
2002.01.08
DB


4-22456
Redmax
2001-11-01 11:10
2002.01.08
COM NetMeeting Objects


1-22239
Gayrus
2001-12-17 03:52
2002.01.08
TStatusBar





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian Japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Spanish swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada Khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish