LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modifying Pane Origin doesn't affect scrolling.

I'm trying to make an application that allows a user to modify the screen size and still be able to control everything. Most of this is done by having a main vi that has subpanels that get filled up with vi's. All of this is built upon actor framework.

 

I don't want any elements on the front panel of all the vi's to change size. The only thing I want is for the position of the vi within the subpanel to change so that it is always centered. I've achieved this by taking the size of a Pane, and setting the origin to the center based on the rectangular area of all the controls. This part works great. I programmatically turn on the scroll bars if the vi won't fit in the subpanel so the user can still get to everything.

 

The problem comes when a user uses the scrollbar on a subpanel. Since the inserted vi is centered, because of the origin change, I would hope the scroll bar would take that modified origin and change it. Instead it seems like whenever I use the scrollbar it takes the default origin, instead of the one I set. This causes my vi's within subpanels to be thrown to one side of the window, instead of remaining center. You can see that behavior in the gif I attached. Example.gif

 

Anybody ever ran into this issue and know a way around it?

0 Kudos
Message 1 of 4
(2,777 Views)

I've look up some methods in property nodes that could help you:

-Property nodes: VI server class

                              >Keep window proportions 

                              >Panel Bounds

                              >Window Bounds

                              >Resizable

 

If you are not going to set other controls or indicators in your front panel you could set a specific window size to prevent the reference problem. By the way, you can always look up for the functions of these methods on the web.

 

Hope this help you.

 

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

Zip file of example code

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

HI ShockHouse,

Thanks for pointing this out. I filed a BUG report for you (our new system instead of CARs) the BUG number is 264279

I hope you have a great weekend!

 
Zofia
NI Technical Support Engineer
Message 4 of 4
(2,613 Views)