Norm Kirchner Posted December 2, 2011 Report Share Posted December 2, 2011 *Disclaimer* So far from a full implementation, but I wanted to get this into the wild to let you all have fun with it. I ran into a situation that pissed me off recently. I had a tab control that had a different graph on each tab. This tab was in a pane that I wanted to be re-size-able. Since LabVIEW does such a shitty job at helping us with this, I made a 'Brat VI' to help me with the process. Attached you will find the Brat and a piece of demo code. Basic assumption and requirements *Tab is not set to auto-grow (I don't handle shrinking tab and auto grown will cause tab to not maintain size w/ pane) *Tab is set to size with pane * Types of controls that are resized are currently limited, string, graphs, sub-panels, decorations, boolean (because I use the 'Many Cast' design pattern, adding more is not a difficult task) * Because this maintained sizing will only work while the VI is running, the Brat is bi-modal in a "Use cached Margins" or "use Saved margins" mode (see video for rational) ============ Basic operation and program flow ---> http://screencast.com/t/jqxWeqwxHcY Beyond getting started & caveats ---> http://screencast.com/t/iCDdQgPhJuDs How it would look & more features ---> http://screencast.com/t/S7Pm47JiD More features and use cases ---> http://screencast.com/t/W4uhAQY4HpbE How to start from scratch ---> http://screencast.com/t/JVOrc503 Tab Resize Tool (2).zip ============ Comments and ideas are welcome (but only if they come w/ good suggestions as well) ~The Captain Was Here PS ManyCast Design Pattern (used within) http://lavag.org/top...sts/#entry77999 Quote Link to comment
Yair Posted December 4, 2011 Report Share Posted December 4, 2011 Comments and ideas are welcome (but only if they come w/ good suggestions as well) Well, we discussed it here in the past, although I have to admit I never had the need to use something exactly like this in a production app, so all the stuff there is just quick and dirty experiments. I haven't looked at the entire discussion there now, but if memory serves, the two interesting points you can find there are the basic difference in calculation (it was the ratio of the control relative to the panel as opposed to constant margins, although I'm not sure what the implications of each are) and that there is an example of a generic (but undocumented) resizing method (which is probably the same code LV uses when the user manually resizes a control). 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.