Click here to Skip to main content
15,914,419 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Helo friends
please dont get angry with this question because i know is kinda complicated for a forum.Am a student and i was given a project on employee management systeem, i have suceeded in doing this project to a certain level but now am having this serious challenge. The thing is on the project there is a form that has a combobox and a rich textbox, now i want that if a user clicks on a dropdown item in combobox, the value or text of the item should be copied to the richtextbox, if he clicks on another item, the value should also be copied to the richtextbox but at the front of the first text which is alredy in the richbox, and i want this process to continue. Please i need the help of u experts. Or can i autocomplete every text a user want to enter in the richbox.please help even if is custom control. Tanx
Posted

1 solution

Good you to see your efforts, But how come before giving you programming lesson they assign you a project.

Nevertheless, As per my understanding you want to show everything in rich-text box whatever user clicks in the dropdown item in the combobox.
C#
RichTextBox1.Text += "Your DropDownItem ";


It would be good if you show us your code :)

More precise.
C#
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     richTextBox1.Text += comboBox1.SelectedItem.ToString();
 }
 
Share this answer
 
v2
Comments
Ese ochuko 19-Oct-12 0:18am    
To do this i was using,
richTextBox1.Text = comBoBox1.Text;
which is not working as i want atall
Sushil Mate 19-Oct-12 0:19am    
try like this richTextBox1.Text += comBoBox1.Text;

& let me know if it is working or not?
Ese ochuko 23-Oct-12 9:31am    
Wow!
Is working like i wanted it to work, but there is just one litle problem is not giving any space between the words
Sushil Mate 23-Oct-12 10:05am    
richTextBox1.Text += comBoBox1.Text + " ";


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900