Jump to content

Making windows return to the right frame by default


HChandler

Recommended Posts

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

Link to comment

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

Link to comment

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.

Link to comment

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:

Link to comment

QUOTE (mballa @ Sep 26 2008, 10:41 AM)

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! :)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.