|
September 8, 2002 Implementing the OnMouseUp Event Handler Tips: September 2002
Yehuda Shiran, Ph.D.
|
|
Suppose you want to override the OnMouseUp event within a certain panel of the docking windows application. First, you need to define the new overriding class:
Then, you need to change the top panel to behave as the ClickPanel class, instead of the generic Panel class. We first change its definition:
And then we need to change its construction statement:
You pop up the window by calling the Application.Run() method. If the package name is say MouseUpPkg and the class name is MouseUpCls, the running statement is:
Whenever you click inside the top panel, a message box will pop up with the event coordinates, like this:
People who read this tip also read these tips: Look for similar tips by subject: |