jozso Posted November 4, 2006 Report Share Posted November 4, 2006 Hello! I've created a login VI. I've grouped the neccessary objects and set the front panel size to (300, 500). My problem is how can I align the group the center of the front panel? Because if I manually move the group, the alignment isn't accurate... Quote Link to comment
Catweazle Posted November 6, 2006 Report Share Posted November 6, 2006 Hello, I guess you can Quote Link to comment
Mike Ashe Posted November 6, 2006 Report Share Posted November 6, 2006 You have to move them individually. You can: 1. get an array of all the references that are members of the same group as your "key" object. 2. get the positions of all the objects. 3. "Defer Panel Updates" for your VI. 4. Set the updated positions of all objects (same offset to all of them) 5. "Enable Panel Updates" to get everything to move at once. Be happy ... Last step, make a suggestion to NI to allow group moves. :thumbup: Hmm, the coffee is good today ... so .... Here is a quick VI to do group moves and a demo Download File:post-45-1162847143.vi Download File:post-45-1162847203.vi The variant is the "key", but you could use any of the upper controls, in the group, which is all the upper controls on the front panel. NOTE: The demo & move VI moves the group position, relative, not absolute. It should be pretty obvious how to modify this to make an absolute, or centered move if you so desire. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.