Mike Le Posted August 15, 2014 Report Share Posted August 15, 2014 (edited) 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 August 15, 2014 by Mike Le Quote Link to comment
hooovahh Posted August 15, 2014 Report Share Posted August 15, 2014 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. 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.