Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, March 17, 2008 12:15:54 AM(UTC)
leftback

Groups: Registered
Posts: 28


Is there a quick way to do this without checking everytime something is repainted?
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, March 17, 2008 4:43:49 AM(UTC)

Adam Boulad  
Guest

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)
leftback

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)

Adam Boulad  
Guest

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)
leftback

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)
leftback

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
}
}
 
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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.118 seconds.