[vtkusers] Help: A problem with the "LeaveEvent" evetn triggering in vtk.

jiang-gx jxjx at sjtu.edu.cn
Wed Apr 27 23:29:01 EDT 2005


hi, everyone.
	
 		My vtk application was developed by VC++,and based on Windows XP operating system. The problem is that when the mouse was move out of a vtkrenderwindow,vtk did not trigger the "LeaveEvent" event. the code is like following: 

	pOnLeaveComm->SetCallback(PaneFrame::OnLeave);

	pRenderWindowInteractor->AddObserver(vtkCommand::EventIds::LeaveEvent, pOnLeaveComm);

	....
	void OnLeave(vtkObject *pCaller, unsigned long eid, void* pClientdata, void *pCalldata)
	{
		.....
	}	

I found that vtk never called the "OnLeave" function while i moved the mouse out of the vtkrenderwindow.

but when i moved the mouse out of the window while pressing down the left mouse button, vtk did call the  OnLeave function.  it seemed so strange!       what is the problem? 

I want vtk to call OnLeave fuction whenever i move the mouse out of the vtkrenderwindow.

Thank you for helping!!  

        jiang-gx
        jxjx at sjtu.edu.cn
          2005-04-28


More information about the vtkusers mailing list