LEADTOOLS Support
Medical
Medical SDK Questions
Detecting a selected cell change in the medicalViewer
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, March 17, 2008 12:15:54 AM(UTC)
Groups: Registered
Posts: 28
Is there a quick way to do this without checking everytime something is repainted?
#2
Posted
:
Monday, March 17, 2008 4:43:49 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Are
you using version 15? Also, are you using the DLL API or the C++ Class Library?
You
can use the DISPCONTAINERACTIONCALLBACK Callback Function in API, which will
fire every time you click or drag the mouse. Then you call L_DispContainerIsCellSelected
in API.
#3
Posted
:
Monday, March 17, 2008 5:03:11 AM(UTC)
Groups: Registered
Posts: 28
Im using c# and .Net - is there a way to do the same in .Net
#4
Posted
:
Tuesday, March 18, 2008 4:05:29 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
The code below detects the mouse up button and returns the selected index of the cell.
//--------------------
medicalViewer1.AddAction((MedicalViewerActionType)101);
medicalViewer1.SetAction((MedicalViewerActionType)101,
MedicalViewerMouseButtons.Right, MedicalViewerActionFlags.Active |
MedicalViewerActionFlags.RealTime);
medicalViewer1.UserActionMouseUp +=new
EventHandler<MedicalViewerMouseEventArgs>(medicalViewer1_UserActionMouseUp);
public void
medicalViewer1_UserActionMouseUp(object sender, MedicalViewerMouseEventArgs
e)
{
MessageBox.Show(e.CellIndex.ToString());
}
//--------------------
#5
Posted
:
Wednesday, March 19, 2008 12:13:00 AM(UTC)
Groups: Registered
Posts: 28
Hey - thanks for the response.
However, when i run this code i tend to get the following error within a few interactions with the medicalViewer.
"Attempted to read or write protected memory. This is often an indication that other memory has been corrupted. "
#6
Posted
:
Wednesday, March 19, 2008 2:30:06 AM(UTC)
Groups: Registered
Posts: 28
IN case anybody has a similar problem here is the way I implemented this :
//add a listener
m_medicalViewer.CellMouseClick += new EventHandler(m_medicalViewer_CellMouseClick);
void m_medicalViewer_CellMouseClick(object sender, MedicalViewerCellMouseEventArgs e)
{
int currentSelectedCell = this.getCellPosition(GetSelectedCell());
if (m_LastSelectedCell != currentSelectedCell)
{
SELECTED CELL HAS CHANGED
}
}
LEADTOOLS Support
Medical
Medical SDK Questions
Detecting a selected cell change in the medicalViewer
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.