LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Child vi cannot disappear when parent vi rolling up

Hello All,

 

I would like to do call control on demand, the approach i use is async call the sub vi and set it as child window

 

however when i scrolling down the main vi, the child vi seem stuck on the top border

Capture.PNG

 

but it has no problem in bottom or side border

bottom borderbottom border

0 Kudos
Message 1 of 26
(3,006 Views)

i realize that if i check the sub vi position and if the top return negative, i can close the front panel to hide the sub vi

 

however i think there would be a better way

0 Kudos
Message 2 of 26
(3,001 Views)

Typically, you put "child windows" in a SubPanel. Not sure if that's what you're already doing.

0 Kudos
Message 3 of 26
(2,978 Views)

Hello CARYA,

 

i already manage to set the sub vi as the child window of main vi

 

the problem is, when i scroll up (while also doing repositioning in background), the child window behave abnormally when it touch top border

 

but it behave normally(just like normal control) in bottom border

0 Kudos
Message 4 of 26
(2,949 Views)

Hello All,

 

i attached a mp4 video that describe my problem

 

the child window behave abnormally when touching the ceiling

0 Kudos
Message 5 of 26
(2,943 Views)

I've used an online converter to convert to zip, but the movie is 22 sec. of black.

 

(You don't have to compress ~330 kB if the zip is ~317 kB).

0 Kudos
Message 6 of 26
(2,931 Views)

Hello Carya,

 

reattached

0 Kudos
Message 7 of 26
(2,925 Views)

Still had to convert to wmv with onlinevideoconverter, but that's ok.

 

It's sure looks weird, but without at least seeing the code it would be impossible to conclude anything. A SubPanel should behave just like any other object, and I've never seen otherwise.

 

Is the code changing the position in any way (properties)?

Is anything set to Scale to Pane?

Is any of the VI's set to "Scale Objects"?

0 Kudos
Message 8 of 26
(2,919 Views)

Hello Carya,

 

i play with the positionCapture.PNG

 

if this vi is disable, the sub vi will stay at the same position regardless how i scroll

0 Kudos
Message 9 of 26
(2,913 Views)

I'm surprised the FP.Run-Time Position.Custom method does anything when the VI is inside a subpanel. You should not use it in this case.

 

I'm pretty sure the sub VI is not in a subpanel control, or that you are controlling the subpanels position in another peace of code.

 

If you insist on using the concept of a subVI as a "child window", you're setting yourself up for failure. LV has subpanels for that.

 

If you want to control the position of the subpanel (and the VI in it!), use the subpanel's position property. Thread the subpanel as a control. Don't think about the VI that's in it. It's a control, and you can set it's position like any other control. In fact, to get you started, try to set a Boolean control's position until it's as desired, then link the property node to the subpanel.

 

If you want to control the VI's origin inside the subpanel: get a reference to it's FP, get all panes, and set the origin of the first pane.

 

0 Kudos
Message 10 of 26
(2,907 Views)