10-24-2011 02:11 PM - edited 10-24-2011 02:16 PM
I'm trying to build in the ability to show either one or both of these graphs. They're set to fit to their respective pane. I can't move the splitter to the right far enough to not show the right graph. I've tried programmatically moving the graph out of the pane view, making it not visible, resetting the minimum pane size, but to no avail. This is just a small example; I'm actually trying to do this with four and eight graphs, but the same vertical splitter principle applies. Is there any way of filling the whole panel with just one of these graphs? Any ideas?
Solved! Go to Solution.
10-24-2011 02:29 PM
I can't open your Vi to take a look, so I don't really understand. Do you really need the splitter? Would tabs work? Could you put all the data into 1 graph instead of using 2 graphs?
10-24-2011 02:33 PM
Thanks for replying.
The VI was in 2011, I've saved it back to 8.0 and reattached.
The panel can be resized by the user and I need the resizing that the splitters provide. My customer wants to see the data on different graphs for scaling purposes, all at the same time.
10-24-2011 03:23 PM
10-24-2011 03:27 PM
The minimum panel width for the graph is exactly the problem I'm trying to overcome. It seems silly to me that the pane cannot be resized smaller than this even if the graph is not visible (hidden) or off the screen. Does anyone know a way around this?
10-24-2011 03:57 PM
Robert,
By the looks of things we're checking to see that panes don't get smaller than the minimal useful size of the controls that are set to scale with pane.
We should look into whether this is a bug or not (it wouldn't surprise me if we designed it this way) but in the meantime there is a workaround that may work for you. Disable the "Scale Object with Pane" option and programmatically resize the graphs yourself whenever the pane size changes. I've attached a functioning demo (LV 2011 format, snippet here for those with older versions).
It's obviously a workaround and not quite as clean as your intended solution but it should work unless there was some other reason why you needed the automatic scale with pane.
[The event structure is capturing the Pane Resize event for both panes]
Hope this helps,
Simon
10-24-2011 04:25 PM - edited 10-24-2011 04:35 PM
I can't try Simon solution because I have LV2009 but another possible workaround (that may not be very practical) would be to use a sub panel and to load different subVI for 1 or 2 graphs display. Attached is a draft. (It use relative path so you can run it from the extracted folder).
Ben64
note: I was a bit lazy doing this so dataflow is not always respected, also there should be a minimum size set for the main window.
10-24-2011 05:12 PM
Setting the PlotAreaSize to 0,0 was key for me. That let me completely minimize the right pane. I still leave the scaling on when I'm showing the right pane, so I don't have to monitor pane resizes. Thanks, Simon.