09-20-2017 11:26 AM - edited 09-20-2017 11:39 AM
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
but it has no problem in bottom or side border
bottom border
09-20-2017 11:38 AM
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
09-20-2017 12:40 PM
Typically, you put "child windows" in a SubPanel. Not sure if that's what you're already doing.
09-20-2017 11:53 PM
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
09-21-2017 12:39 AM
Hello All,
i attached a mp4 video that describe my problem
the child window behave abnormally when touching the ceiling
09-21-2017 02:58 AM
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).
09-21-2017 03:34 AM
Hello Carya,
reattached
09-21-2017 03:59 AM
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"?
09-21-2017 04:08 AM
Hello Carya,
i play with the position
if this vi is disable, the sub vi will stay at the same position regardless how i scroll
09-21-2017 04:54 AM - edited 09-21-2017 05:01 AM
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.