ListBox Click

M

ma...

How can I use the Click event from a listBox? It lets me add the click
event but it never fires. Any ideas?

Windows Form Designer generated code
//
// listBox1
//
this.listBox1.Location = new System.Drawing.Point(8, 128);
this.listBox1.Size = new System.Drawing.Size(100, 100);
this.listBox1.Click += new EventHandler(listBox1_Click);


// List Box Click event
private void listBox1_Click(object sender, EventArgs e)
{
MessageBox.Show("listBox1 was clicked");
}

Thanks,
Jason
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top