HChandler Posted September 26, 2008 Report Share Posted September 26, 2008 Here's what I'm talking about. I design a front panel. I set the properties so that when it pops up it has no scroll bars, like a dialog. There may be some controls or indicators someplace on the panel, some are outside of the frame and are meant to be there. Others are carefully placed within the frame to make a nice display. Then, I get some kind of error. I choose the useful option to go to the error. It pans the panel to show the messed up indicator. I fix the problem. Then, I forget to re-frame the panel to hide the bits and pieces. When the program pops up the sub-panel exposes stuff that's supposed to be out of view, indicators or controls are exposed, and even worse, some important control/indicator gets shoved out of the picture. Is there any way to lock the frame, or set a default view that always snaps back at run time to what I want it to be in spite of what happens while the program is not running. Thanks, Howard Quote Link to comment
TobyD Posted September 26, 2008 Report Share Posted September 26, 2008 QUOTE (HChandler @ Sep 25 2008, 02:51 PM) Is there any way to lock the frame, or set a default view that always snaps back at run time to what I want it to be in spite of what happens while the program is not running. You should be able to use the Front Panel --> Position property node to set this at runtime. http://lavag.org/old_files/monthly_09_2008/post-8758-1222381331.png' target="_blank"> Quote Link to comment
JonMA Posted September 27, 2008 Report Share Posted September 27, 2008 QUOTE (HChandler @ Sep 25 2008, 05:51 PM) Is there any way to lock the frame, or set a default view that always snaps back at run time to what I want it to be in spite of what happens while the program is not running. Howard, Open G has many available toolkits, but there is one with many useful functions dedicated to application control - oglib_appcontrol - it can be found using VIPM offered by JKI. There is a function in the tool kit which will fit your application to the largest decoration - therefore you can surround the part of your application with a decoration that you want to always show when executed and it will ensure you see what you want to. Hope that helps. Jon Quote Link to comment
djolivet Posted September 27, 2008 Report Share Posted September 27, 2008 I developed my interface VIs with the FP origin set at zero. Then, during execution, before you open/display the front panel, use a property node to set the origin to 0 again. Quote Link to comment
crelf Posted September 27, 2008 Report Share Posted September 27, 2008 QUOTE (JonMA @ Sep 25 2008, 06:54 PM) Open G... There is a function in the tool kit which will fit your application to the largest decoration - therefore you can surround the part of your application with a decoration that you want to always show when executed and it will ensure you see what you want to. :thumbup: Good one Jon - this is one of the OpenG reuse VIs that I use the most: it's in almost every VI that I write that shows it's front panel. I also use the VI that sizes to all objects (with a border of 20 or so pixels) at the end of the VI to show everything again (particularily useful when in development mode). Trick: you can set the border in the size-to-largest-decoration to a negative number (like -1 or -2) as to not see the border of the decoration. Quote Link to comment
HChandler Posted September 27, 2008 Author Report Share Posted September 27, 2008 Thanks, This is really helpful. Howard Quote Link to comment
Mark Balla Posted September 27, 2008 Report Share Posted September 27, 2008 QUOTE (HChandler @ Sep 25 2008, 04:51 PM) Is there any way to lock the frame, or set a default view that always snaps back at run time to what I want it to be in spite of what happens while the program is not running.Thanks, Howard Here is the sequence I use to put my Main or dialog Front panels in place at runtime. here is a demo vi to show how it works Download File:post-584-1222440051.zip Quote Link to comment
HChandler Posted September 27, 2008 Author Report Share Posted September 27, 2008 One other thing. Is there an easy way to find out what the current position is? or (ok two other things) Is there a quick way to shift the the current view's position to the origin? Thanks Quote Link to comment
TobyD Posted September 27, 2008 Report Share Posted September 27, 2008 QUOTE (crelf @ Sep 26 2008, 06:51 AM) Trick: you can set the border in the size-to-largest-decoration to a negative number (like -1 or -2) as to not see the border of the decoration. That's good to know. It would make a good addition to the VI Description :thumbup: Quote Link to comment
crelf Posted September 27, 2008 Report Share Posted September 27, 2008 QUOTE (mballa @ Sep 26 2008, 10:41 AM) Here is the sequence I use to put my Main or dialog Front panels in place at runtime. That would make a good addition to that OpenG palette... QUOTE (TobyD @ Sep 26 2008, 11:04 AM) That's good to know. It would make a good addition to the VI Description :thumbup: It's open source, so get on over to OpenG.org and make it happen! Quote Link to comment
HChandler Posted September 27, 2008 Author Report Share Posted September 27, 2008 Alright!!! :thumbup: That demo is is downright usable!! Thanks Quote Link to comment
PaulG. Posted September 27, 2008 Report Share Posted September 27, 2008 QUOTE (mballa @ Sep 26 2008, 10:41 AM) Here is the sequence I use to put my Main or dialog Front panels in place at runtime. here is a demo vi to show how it works Download File:post-584-1222440051.zip Well done. I'll be using this a lot. :thumbup: 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.