From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with mouse down event on image display

Hi all,

 

I am trying to capture the mouse click position on an image display. My problem is it also captures mouse down event when I try to use scroll bar.

 

Any idea? How to avoid it?

 

Thanks,

 

 

 

 

0 Kudos
Message 1 of 6
(3,078 Views)

Do you need the scroll bar? You could resize the image window, or use Zoom to Fit on the image display to get the image sized to match the window.

John B.
Embedded Networks R&D
National Instruments
Certified LabVIEW Developer
0 Kudos
Message 2 of 6
(3,074 Views)

Thanks for your reply.

 

I do need the scroll bar so that user can drag and check the image closely after zoom in and pick up interesting points .

 

Thanks,

 

 

0 Kudos
Message 3 of 6
(3,072 Views)

It is possible to ignore the scrollbars, but it will require some modifications to your program. In the event structure for the mouse down event, you will need to include some logic to check whether the user is clicking on the scroll bar or not, and ignore or process the event accordingly. In order to implement that check, you can use property nodes to determine the front panel position of the mouse and the scroll bars. Then simply disregard all of the mouse down events that occur in the positions that you know to correspond to the locations of the scrollbars. It shouldn't be too complicated to implement those checks in your code, though it will require some work to determine the locations of the scrollbars. You can determine the location of the scroll bars programatically with property nodes to account for moving the indicator around. Have a great weekend!

John B.
Embedded Networks R&D
National Instruments
Certified LabVIEW Developer
0 Kudos
Message 4 of 6
(3,067 Views)

Hi John,

 

How to determine the location of the scroll bars programatically with property nodes? Could you please give me an simple emxample?  I checked the property node and couldn't get it.

 

Thanks for helping.

 

Anne

0 Kudos
Message 5 of 6
(3,047 Views)

got it. thanks.

 

 

0 Kudos
Message 6 of 6
(3,042 Views)