Click here to Skip to main content
15,914,780 members
Home / Discussions / C#
   

C#

 
GeneralRe: Perhaps a threading problem? Pin
George Quarton14-Dec-09 12:17
George Quarton14-Dec-09 12:17 
GeneralRe: Perhaps a threading problem? Pin
Luc Pattyn14-Dec-09 12:41
sitebuilderLuc Pattyn14-Dec-09 12:41 
GeneralRe: Perhaps a threading problem? Pin
George Quarton14-Dec-09 12:45
George Quarton14-Dec-09 12:45 
GeneralRe: Perhaps a threading problem? [modified] Pin
Luc Pattyn14-Dec-09 13:00
sitebuilderLuc Pattyn14-Dec-09 13:00 
QuestionTiming-related issue when connecting to a newly created database Pin
vtchris-peterson14-Dec-09 8:38
vtchris-peterson14-Dec-09 8:38 
AnswerRe: Timing-related issue when connecting to a newly created database Pin
Migounette14-Dec-09 20:44
Migounette14-Dec-09 20:44 
GeneralRe: Timing-related issue when connecting to a newly created database Pin
vtchris-peterson15-Dec-09 3:56
vtchris-peterson15-Dec-09 3:56 
QuestionC# RichTextBox strange behaviour Pin
ikurtz14-Dec-09 8:13
ikurtz14-Dec-09 8:13 
greetings,

for the first time ever im investigating RichTextBox control in C# windows forms. i know i need this control in my app as textBox is to simple for my needs.

i have the followig code:


<br />
using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Linq;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
<br />
namespace _19_richtextbox<br />
{<br />
    public partial class Form1 : Form<br />
    {<br />
        public Form1()<br />
        {<br />
            InitializeComponent();<br />
        }<br />
<br />
        private void richTextBoxHome_KeyDown(object sender, KeyEventArgs e)<br />
        {<br />
            if (e.KeyValue == (char)(Keys.Return))<br />
            {<br />
                richTextBoxChat.AppendText("Home:" + richTextBoxHome.Text + "\n");<br />
                richTextBoxHome.Clear();<br />
            }<br />
        }<br />
<br />
    }<br />
}<br />


for the moment i just want whatever is typed in one richtextbox to be displayed on the other richtextbox on hitting return.

the issue is everytime i hit return the data is being transfered to the other control but the first control is left with a carriage return before the cursor. this happens everytime i hit return.

how do i make it stop doing this?

both the controls accept multiline input.

please advise if i need to provide more info.

thank you for your time.
AnswerRe: C# RichTextBox strange behaviour Pin
OriginalGriff14-Dec-09 8:42
mveOriginalGriff14-Dec-09 8:42 
GeneralRe: C# RichTextBox strange behaviour Pin
ikurtz14-Dec-09 8:50
ikurtz14-Dec-09 8:50 
GeneralRe: C# RichTextBox strange behaviour Pin
OriginalGriff14-Dec-09 9:09
mveOriginalGriff14-Dec-09 9:09 
GeneralRe: C# RichTextBox strange behaviour Pin
ikurtz14-Dec-09 9:14
ikurtz14-Dec-09 9:14 
QuestionWONDER Pin
farokhian14-Dec-09 7:58
farokhian14-Dec-09 7:58 
AnswerRe: WONDER Pin
loyal ginger14-Dec-09 8:08
loyal ginger14-Dec-09 8:08 
AnswerGOLDEN WONDER Pin
Keith Barrow14-Dec-09 8:09
professionalKeith Barrow14-Dec-09 8:09 
GeneralRe: GOLDEN WONDER Pin
farokhian14-Dec-09 8:16
farokhian14-Dec-09 8:16 
AnswerRe: WONDER Pin
OriginalGriff14-Dec-09 8:39
mveOriginalGriff14-Dec-09 8:39 
GeneralRe: WONDER Pin
farokhian14-Dec-09 8:59
farokhian14-Dec-09 8:59 
GeneralRe: WONDER Pin
Luc Pattyn14-Dec-09 9:24
sitebuilderLuc Pattyn14-Dec-09 9:24 
GeneralRe: WONDER [modified] Pin
0x3c014-Dec-09 9:26
0x3c014-Dec-09 9:26 
GeneralRe: WONDER Pin
Luc Pattyn14-Dec-09 9:31
sitebuilderLuc Pattyn14-Dec-09 9:31 
QuestionDo I need to create a struct? Pin
bbranded14-Dec-09 5:05
bbranded14-Dec-09 5:05 
AnswerRe: Do I need to create a struct? Pin
OriginalGriff14-Dec-09 5:16
mveOriginalGriff14-Dec-09 5:16 
GeneralRe: Do I need to create a struct? Pin
bbranded14-Dec-09 5:17
bbranded14-Dec-09 5:17 
GeneralRe: Do I need to create a struct? Pin
OriginalGriff14-Dec-09 5:21
mveOriginalGriff14-Dec-09 5:21 

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.