Click here to Skip to main content
15,917,061 members
Home / Discussions / C#
   

C#

 
AnswerRe: How can i access the usb port in VC#.net 2003 and framework1.1 Pin
bearfx17-Oct-06 4:32
bearfx17-Oct-06 4:32 
QuestionSystem.Runtime.InteropServices.ExternalException Pin
ampk17-Oct-06 0:40
ampk17-Oct-06 0:40 
Questionhow to plot ? Pin
s4_sabahatf16-Oct-06 23:33
s4_sabahatf16-Oct-06 23:33 
AnswerRe: how to plot ? Pin
Stefan Troschuetz17-Oct-06 0:07
Stefan Troschuetz17-Oct-06 0:07 
QuestionRange validation attribute Pin
praveenqwe16-Oct-06 23:12
praveenqwe16-Oct-06 23:12 
QuestionControl Development Resources Pin
Brady Kelly16-Oct-06 22:41
Brady Kelly16-Oct-06 22:41 
AnswerRe: Control Development Resources Pin
J4amieC16-Oct-06 22:46
J4amieC16-Oct-06 22:46 
QuestionRichTextBox - Scrolling to the current line ? Pin
fracalifa16-Oct-06 22:28
fracalifa16-Oct-06 22:28 
Hi all,

I have the problem to keep the current added line in a RichTextBox in view. So the text should be scrolled if it exceeds the frame range.

I tried it with ScrollToCare method but it has no visible effect.

The code snippet should place the cursor always at the current position
but it does not scroll to the end of the lines. I tried 3 versions with no effect.


private void button1_Click(object sender, System.EventArgs e)<br />
{<br />
try<br />
{<br />
this.richTextBox1.Clear();<br />
for(int i=0; i<200; i++)<br />
{<br />
this.richTextBox1.SelectedText = "Index = " + i.ToString() + "\r\n"; // 1. try<br />
// this.richTextBox1.AppendText("Index = " + i.ToString()+ "\r\n"); // 2. try<br />
// this.richTextBox1.Text += "Index = " + i.ToString()+ "\r\n"; // 3. try<br />
this.richTextBox1.ScrollToCaret();<br />
}<br />
}<br />
catch{}<br />
}



What's wrong ?

Tnx in advance
Regards
Frank
AnswerRe: RichTextBox - Scrolling to the current line ? Pin
sam#16-Oct-06 22:39
sam#16-Oct-06 22:39 
GeneralRe: RichTextBox - Scrolling to the current line ? Pin
fracalifa16-Oct-06 22:55
fracalifa16-Oct-06 22:55 
GeneralRe: RichTextBox - Scrolling to the current line ? Pin
AB777116-Oct-06 23:17
AB777116-Oct-06 23:17 
GeneralRe: RichTextBox - Scrolling to the current line ? Pin
fracalifa16-Oct-06 23:40
fracalifa16-Oct-06 23:40 
GeneralRe: RichTextBox - Scrolling to the current line ? Pin
AB777116-Oct-06 23:46
AB777116-Oct-06 23:46 
GeneralRe: RichTextBox - Scrolling to the current line ? Pin
fracalifa16-Oct-06 23:59
fracalifa16-Oct-06 23:59 
GeneralRe: RichTextBox - Scrolling to the current line ? Pin
sam#17-Oct-06 0:09
sam#17-Oct-06 0:09 
GeneralRe: RichTextBox - Scrolling to the current line ? Pin
fracalifa17-Oct-06 0:22
fracalifa17-Oct-06 0:22 
GeneralRe: RichTextBox - Scrolling to the current line ? Pin
AB777117-Oct-06 0:10
AB777117-Oct-06 0:10 
GeneralRe: RichTextBox - Scrolling to the current line ? Pin
Dave Kreskowiak17-Oct-06 2:21
mveDave Kreskowiak17-Oct-06 2:21 
GeneralRe: RichTextBox - Scrolling to the current line ? Pin
fracalifa17-Oct-06 3:19
fracalifa17-Oct-06 3:19 
GeneralRe: RichTextBox - Scrolling to the current line ? Pin
Dave Kreskowiak17-Oct-06 18:05
mveDave Kreskowiak17-Oct-06 18:05 
GeneralRe: RichTextBox - Scrolling to the current line ? Pin
fracalifa17-Oct-06 20:47
fracalifa17-Oct-06 20:47 
GeneralRe: RichTextBox - Scrolling to the current line ? Pin
Dave Kreskowiak18-Oct-06 1:44
mveDave Kreskowiak18-Oct-06 1:44 
Questiontwo column sorting Pin
PaulaM16-Oct-06 22:14
PaulaM16-Oct-06 22:14 
QuestionThinning a image Pin
s4_sabahatf16-Oct-06 22:13
s4_sabahatf16-Oct-06 22:13 
QuestionKey Processing in 2003 Question Pin
eyalRF16-Oct-06 20:56
eyalRF16-Oct-06 20:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.