Jump to content

"Fit VI to largest decoration" causes window to contract when a control is set to "Scale with Pane"


Recommended Posts

I've attached an example.

 

The graph is set to "Scale Object with Pane." When executed, OpenG's "Fit VI window to Largest Decoration" method is called. Both the graph and the decoration shrink to a much smaller size.
 
Closing the VI without saving and reopening it will restore the original sizes. If you uncheck "Scale Object with Pane" on the graph and execute, the window resizes to the decoration. Neither the Graph nor the decoration get erroneously resized.
 
Our actual use case is more complicated, but basically involves a transparent decoration to set an initial size, but with the option for the user to resize. I stripped it down to just show the buggy behavior with as few parts as possible.

Fit VI Window to Decoration Bug.vi

Edited by Mike Le
Link to comment

I don't know if I would call this buggy, but unintended instead.

 

The OpenG fit function just resizes the window to be the same size as the decoration.  In this case 720 by 504.  If I resize the window to be this size manually then what the UI looks like, is exactly what the UI would look like if you run the VI and have it resize the window.

 

The window resize resizes the graph, and the graph resize resizes the whole UI.  So resizing the UI either by manual means or the fit function screws with the whole thing.

 

EDIT: Proposed solution, splitters and panes, or subpanels.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.