|
-
September 26th, 2011, 06:51 PM
#1
Make the selected text of a listbox the text inside a textbox
Do you know how to make the selected text of a listbox the text inside a textbox?
I tried this but its not working:
Code:
string[] details = { listBox4.SelectedItem.ToString() };
textBox5.Text = details[0];
-
September 26th, 2011, 08:39 PM
#2
Re: Make the selected text of a listbox the text inside a textbox
Are you handling the SelectedIndex changed event?
What happens when you set a break point on the following line
Code:
textBox5.Text = details[0];
and inspect the details variable in the watch window (or by hovering over it)?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|