Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding MouseClick event

Status
Not open for further replies.

plunkett

Technical User
Jun 10, 2004
57
0
0
US
I'm using a 3rd party listbox-like component that is very similar to .net's build int listbox, witch a few enhancements. The problem is that it doesn't have a mouseclick event. What needs to be added to make this work?
 
best to discuss this with the vendor. nobody will know the product better.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
They no longer suppoort it :( Is it not a pretty easy task to wire up a mouseclick event for a component?
 
Can you put the control in a panel and use the panel's click event?

 
hmmm.. Upon further consideration, clicking the component inside the container isn't going to fire the container's click event.. Let me see if I can come up with something.. I will post back shortly.

 
How about something like this:

Code:
private void Form1_Load(object sender, EventArgs e)
{

    Control control = (Control)MyControl;
    control.MouseClick += new MouseEventHandler(c_MouseClick);

}

void c_MouseClick(object sender, MouseEventArgs e)
{
   //Do Something here
}



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top