Newbie...HandleMouseUp, Where does it come from?

  • Thread starter Thread starter Randy
  • Start date Start date
R

Randy

Hello,
I've got an app that creates a custom class and extends
DataGridTextBoxColumn. I found this out on the web somewhere. I plugged it
in my app and works fine. However, I'm perplexed on something. Within this
class it has two methods...
public void HandleMouseUp(object sender, MouseEventArgs e)
and
public void HandleMouseDown(object sender, MouseEventArgs e)

These two methods get called depending of the mouse action. Apparently, they
are events. When I look at the specs for DataGridTextBoxColumn, there are no
events by these names. There are also no methods described by these names.
Can someone explain why/how these two methods get called? How are they set
up (apparently as events) when they don't show as public events for this
DataGridTextBoxColumn class.

Thanks
 
Hi Randy,

The method that gets called on a certain event does not have to be named
in any special way.
The events are called MouseUp/MouseDown so search the code for lines
looking like

<???>.MouseUp += new MouseEventHandler(HandleMouseUp);
<???>.MouseDown += new MouseEventHandler(HandleMouseDown);

What happens is that the MouseUp/Down event is attached to the method
inside () this method can be called anything you like.
 
Randy,
I'll get you started with--Objects inherit from their parents. Look back up
the inheritence chart and you'll see an object that listens for mouse events.
 
Back
Top