11-20-2012, 06:05 PM
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?
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?