Hello,
This seems to be aproblem when converting the mouse coordenates. I'll file a report on this to have it corrected in future releases on CVI. In the mean time I went through the code (this is open source), located the problematic function and coded a small modification to take into account the scrolling.
To fix this in your computer follow this steps:
- Add to your project "toolbox.c" found at [CVI]\toolslib\toolbox
- Open the file and navigate to line 3203
- Replace the function there with the following code:
static int PointConvertToGlobal(int childPanel, Point *point)
{
int error = 0, top, left, topScroll, leftScroll;
int thisParent;
GetPanelAttribute(childPanel, ATTR_TOP, &top);
GetPanelAttribut
e (childPanel, ATTR_VSCROLL_OFFSET, &topScroll);
GetPanelAttribute(childPanel, ATTR_LEFT, &left);
GetPanelAttribute (childPanel, ATTR_HSCROLL_OFFSET, &leftScroll);
point->x += left-leftScroll;
point->y += top-topScroll;
errChk( GetPanelAttribute(childPanel, ATTR_PANEL_PARENT, &thisParent));
if (thisParent)
return PointConvertToGlobal(thisParent, point);
Error:
return error;
}
The only modification is that I read the offset of the scroll bars and subtracted to the coordenates, this fixes the weird behaviour in panels with scroll bars.
Thanks for your feedback, and let me know if you have any further questions.
Regards,
Juan Carlos
N.I.