Double-Click Event on LabVIEW Splitter Object Makes It Jump Back to Original Position

Updated Sep 28, 2024

Reported In

Software

  • LabVIEW

Issue Details

I added a left-click event to a splitter object in LabVIEW to move it programmatically. When clicking, the splitter will move to the programmed position, but then instantly jump back to the original position.

Solution

The splitter bar is a draggable LabVIEW object that waits for the user to release the left mouse button to move to the released position. When adding a left-click --or double [left] click-- event to move it programmatically, it conflicts with the innate application's action to move it where it was dragged.
Although this is not a bug, but rather a normal behavior of a draggable object, there are two possible workarounds to this problem:
  • Locking the splitter bar, disabling manual dragging. By disabling manual dragging, the application stops overriding the programmatic position of the splitter, and it can be flawlessly moved programmatically without issues. To lock the splitter, follow these steps:
    1. Right click the splitter
    2. Make sure the option Locked is ticked.
Locked position marked
  • Use middle- or right-click button instead of left-click. Since the behavior is tied to the dragging of the splitter, it will only be affected by any left-click interaction. Switching the code of your LabVIEW application to recognize middle- or right-click will solve this issue. This solution, however, might not be as intuitive for the end-user.