LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to move control in front panel at run time

       Hi,

                I'm using LabVIEW 8.5. I want to move the control anywhere in front panel. For example in the attach file I want to pick up the pict control (with the help of mouse) and drop it anywhere in front panel. second thing I want to ask if I want to make it copy paste, means main control will b at its initial position and where the mouse moves the image moves and when I leave the mouse  the image gets drops there. How to do it. Please help me.

                             - Thank You

0 Kudos
Message 1 of 23
(4,742 Views)

Hi Sonali,

use the example finder to find an example for drag and drop. There is also an example with a picture ring.

You should create an event for your stop button.

 

Mike

0 Kudos
Message 2 of 23
(4,729 Views)

Thanks, I have seen that example, but I don't want fix destination, I want to drop it anywhere in front panel.

                                                                                                                                                      Thank you

0 Kudos
Message 3 of 23
(4,725 Views)

Hi Sonali,

i think it's not simple to drop a picture on the frontpanel at runtime without using a control. You can use a picture control as background and drop it there. With "draw unflatten pixmap" you can select the position of your moved image.

 

Mike

0 Kudos
Message 4 of 23
(4,723 Views)

Hi,

        So its not possible to drop anywhere??... In my application I need to make the full track from one station to another and its not fixed where I want turns also. According to condition I will make the turn.

                                                  -  Thank you

0 Kudos
Message 5 of 23
(4,718 Views)

Hi Sonali,

if you use a picture control, then you can drop it inside of it. If your picture control has the size of your fp then you can drop it everywhere. If you want to draw directly on the front panel then you need some functions from the win api.

 

Mike

0 Kudos
Message 6 of 23
(4,715 Views)

Without pict control how to make it possible? One more question If I want to rotate one more control over it (obviously Train), how to do it?

 

 

                                -     Thank you

              

0 Kudos
Message 7 of 23
(4,712 Views)

Sonali,

 

You can get some idea here. Smiley Happy

 

But I think you CANNOT copy & paste controls/indicators on the fly. Smiley Sad

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 8 of 23
(4,709 Views)
I m attaching the VI in that link in LV 8.0 format.
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 9 of 23
(4,707 Views)

"Sonali" <x@no.email> wrote in message
news:1235641207960-860712@exchange.ni.com...
Hi,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp; I'm using LabVIEW 8.5. I want to move the
control&nbsp;anywhere in front panel. For example in the attach&nbsp;file I
want to pick up the pict control (with the help of mouse)&nbsp;and&nbsp;drop
it anywhere&nbsp;in front panel.

You'll need to use an event structure to respond to the mouse down, mouse
move and mouse up events. In the mouse down event of the control, set a
value in a shift register to true. In the mouse move event, when the value
is true, change the position of the control with a position property node.
In the mouse up event of the control, set the boolean in the shift register
to false.

&nbsp;second thing I want to ask if I want to make&nbsp;it copy
paste,&nbsp;means main control will b at its initial position and where the
mouse moves the image moves and when I leave the mouse&nbsp; the image gets
drops there. How to do it. Please help
me.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;

You can't copy paste controls during run time. It seems you want to make a
graphical application, where you can graphically drag and drop some
configuration or something like that. You should have a look at the picture
control. You can draw anything you want in this control, and catch mouse
down, move and up events in the same way. It is perhaps a bit difficult to
get to know it, but it is very powerful when you do.

Regards,

Wiebe.


0 Kudos
Message 10 of 23
(4,703 Views)