LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I make a draggable window without a toolbar?

I have a LabVIEW window that doesn't have a toolbar, but I'd like to make the window draggable, either by clicking the background and dragging it, or by clicking some control. Is this possible in LabVIEW?
0 Kudos
Message 1 of 4
(2,917 Views)

Hi Anil Kand...,

you can use the Mouse Down, Mouse Move and Mouse Up Event from the front panel. Use the Mouse Down event to know the start time and position and calculate the move in the Mouse Move Event. The action in the Mouse Move Event should only be possible if the mouse key is down. Therefore you can use a flag which you set to true in the Mouse Down Event and false in the Mouse Up Event. You can also use the Mouse Leave Event if someone leave the vi. It´s not really the same as a real drag, but you can simulate it.

 

Hope it helps.

Mike

0 Kudos
Message 2 of 4
(2,908 Views)

Mike,

Thanks. I was hoping that there was an option in LabVIEW that I had missed that would make it easy, but your method sounds good, so I'll try that. Thanks for your help!

Anil 

0 Kudos
Message 3 of 4
(2,902 Views)

I know this is a very old thread. But I wanted to do the same thing today, and here is the VI that does it. Just wanted to contribute to the community.  Just using Mouse Down/Move/Up was not enough. I also need to use Pane Leave Event in order not to lose track of mouse when you move the cursor very fast.

TailOfGon
Certified LabVIEW Architect 2013
Message 4 of 4
(2,423 Views)