09-05-2022 04:58 AM
Hello everyone,
I have an issue with graph resize.
When I resize a graph I want my palette graph to be aligned with the graph bordure, as shown below.
But when I reduce my window too much, this palette just go to the left and don't ever come back to the right, even when I make the windows bigger.
So I want to manipulate this palette but I just can't find a property nor method node to manage it.
There is only 1 solution for me but it takes time --> Replacing the palette with a new control wich does the exact same things that the palette and then resize it.
Did you ever encounter this problem ? Do you have an idea to explore ?
Thanks and see you !
Solved! Go to Solution.
09-05-2022 05:31 AM - edited 09-05-2022 05:34 AM
@TenJigoku77 wrote:There is only 1 solution for me but it takes time --> Replacing the palette with a new control wich does the exact same things that the palette and then resize it.
Sadly, that is the only solution I've found.
There are ways to get a reference to the graph palette, but I wouldn't use them in production code.
Automatic scaling in general is primitive and flawed.
Scaling of graphs (manual or automatic) is primitive and flawed.
Scaling of graphs is a challenge.
09-05-2022 07:31 AM
This is quite an old thread, but I still do it the same as described there. For me it is a good workaround.
https://forums.ni.com/t5/LabVIEW/How-to-fix-control-s-position-in-front-panel-pane/m-p/1010975
Read all first three posts...
09-05-2022 07:51 AM
Another note: Set the min-size of the pane to a value where the graph palette always does as expected
09-05-2022 08:21 AM
@daveTW wrote:
This is quite an old thread, but I still do it the same as described there. For me it is a good workaround.
https://forums.ni.com/t5/LabVIEW/How-to-fix-control-s-position-in-front-panel-pane/m-p/1010975
Read all first three posts...
Doesn't the Plots control block the scale?
Anyway, most often the graph controls don't what I want, so I end up re-making all functionality anyway (plots, graph, cursor...). And since the scaling doesn't do what I want, I re-make that also 😁.
09-06-2022 02:53 PM
wiebe@CARYA wrote:
@TenJigoku77 wrote:There is only 1 solution for me but it takes time --> Replacing the palette with a new control wich does the exact same things that the palette and then resize it.
Sadly, that is the only solution I've found.
There are ways to get a reference to the graph palette, but I wouldn't use them in production code.
Really? What are those ways?
09-06-2022 03:17 PM
I have found that autosizing a graph (including the palette location) works if, and only if, it's the only control in that panel. Try using splitter bars to create a place for the palette, then size the palette to fill that panel, and set that panel to Scale Objects While Resizing. Generally this hasn't been a problem for me. This also works when you make the graph really small and then larger.
The problem is, of course, that you can't have other buttons or items in this frame. I attached a demo, give it a go. It's not a full solution to your problem but it might help.
09-06-2022 03:44 PM
@BertMcMahan wrote:
I have found that autosizing a graph (including the palette location) works if, and only if, it's the only control in that panel. Try using splitter bars to create a place for the palette, then size the palette to fill that panel, and set that panel to Scale Objects While Resizing. Generally this hasn't been a problem for me. This also works when you make the graph really small and then larger.
The problem is, of course, that you can't have other buttons or items in this frame. I attached a demo, give it a go. It's not a full solution to your problem but it might help.
This solution kind of works for special cases. (Like when palette is at the edge of a plot.) Using your VI in LabVIEW 2020, I did the following:
Palette is no longer at center. This is my biggest pet peeve about LabVIEW, besides the move to SAAS. A graphical programming language should have better UI tools.
Start with palette in center
Make plot small.
Make plot larger. Palette no longer in center. 😞
09-06-2022 04:27 PM
@mcduff wrote:
This is my biggest pet peeve about LabVIEW, besides the move to SAAS. A graphical programming language should have better UI tools.
Couldn't agree more. Yes it is unfortunate that my method only works with edge cases (😉) but it's literally the only way I've found to have resizeable graphs. Regarding the "centering" option, it's hard to say if you want it to stick with its relative location (i.e., centered) or its absolute location (i.e., 45 pixels inset from the left side) so I can sort of see why it doesn't work that way.
Ideally we'd get some more full featured tools to better handle the UI, but at the very least it would be nice to be able to manipulate the various plot tools from the plot itself. (like in my Idea Exchange post).
09-06-2022 04:52 PM
@BertMcMahan wrote:
@mcduff wrote:
This is my biggest pet peeve about LabVIEW, besides the move to SAAS. A graphical programming language should have better UI tools.
Couldn't agree more. Yes it is unfortunate that my method only works with edge cases (😉) but it's literally the only way I've found to have resizeable graphs. Regarding the "centering" option, it's hard to say if you want it to stick with its relative location (i.e., centered) or its absolute location (i.e., 45 pixels inset from the left side) so I can sort of see why it doesn't work that way.
Ideally we'd get some more full featured tools to better handle the UI, but at the very least it would be nice to be able to manipulate the various plot tools from the plot itself. (like in my Idea Exchange post).
I use the same method myself, and given a kudo to your idea in the past. (When I clicked a kudo disappeared then when a re-clicked it came back.)