hi guys, I am a Beginer Programmer. :confused:
I Like to Learn about C# and i started from a week ago.
I Searched in google to find a froum to get some help about C#.
and i found this website.i hope i can find some friend to get help.
For first Question, i want to make a project and i have some question about it.
i have a Main page ( Form1 ) and i have a ComboBox on it.
i made a ComboBox with Readonly( true) and i put a RichTextBox under this ComboBox on mainpage.
now, in ComboBox i have 2 selecteditem.
i want to know how to write code for combobox that if someone klicked on first selecteditem in combobox then he will see in richtextbox for example ( hello ) , if he klicked on second he will see in richtextbox ( bye )?
Can someone please help me?
Thank you so much :p
ShahdaaD
0
Newbie Poster
Recommended Answers
Jump to Posthi guys, I am a Beginer Programmer. :confused:
I Like to Learn about C# and i started from a week ago.
I Searched in google to find a froum to get some help about C#.
and i found this website.i hope i can find some friend to get help.
For first Question, i want …
Jump to PostIt can be achieved as:
if (cmbo.selectedindex==0) /////it will return first selected item...
rtb.text="Hello";
if (cmbo.selecteditem==1)////it willl return second
rtb.text="bye";
i think it will work.try it :regards
All 7 Replies
Paladine
138
Master Poster
Team Colleague
fanofeducation
0
Newbie Poster
Aun Muhammad
0
Newbie Poster
RwCC
56
Junior Poster
archa
-1
Newbie Poster
jonsca
commented:
Don't bump old threads
-1
archa
-1
Newbie Poster
kvprajapati
1,826
Posting Genius
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.