To download NI software, including the products shown below, visit ni.com/downloads.
Overview
Event structures are very useful in handling mouse interaction with controls on a VI front panel. This functionality, however, is not extended to generic objects, such as decorations. This VI compares the coordinates from a mouse click or movement and determines if the cursor is within the bounds of a specified object.
Description
In the main VI TestBounds.vi a generic object reference is passed into an event structure. When a mouse is pressed down within the VI pane, the sub VI Within Object Bounds.vi compares the coordinates of the cursor with the generic object bounds. If the mouse is, in fact, within the bounds, the LED on the main VI lights up.
Requirements
Steps to Implement or Execute Code
Additional Information or References
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.