Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Listbox items text and text boxes?
#1
Ok, I have I have a list box, kryptonListBox1, and a text box textBoxX1. I want to get the selected item in the listbox's text into the text box. My code is:

textBoxX1.Text = kryptonListBox1.SelectedItem.ToString

I've tried using .Text.ToString, but with both I get the error 'Object reference not set to instance of an object'

What am I doing wrong and what's the easiest way to fix it?


Messages In This Thread
Listbox items text and text boxes? - by Derek275 - 11-20-2012, 06:05 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Text to Speech Vinwarez 2 11,650 03-13-2012, 10:56 PM
Last Post: Vinwarez
  Files in a listbox Hurricane 4 19,713 02-27-2012, 03:32 PM
Last Post: brandonio21

Forum Jump:


Users browsing this thread: 1 Guest(s)