02-11-2013 07:53 AM
I am trying to collapse the right side pane in this VI based on the window boundaries so I can run it on multiple screen sizes. I got the left side one to work in another VI, but I cant seem to get teh right side to work without getting an error that I am trying to resize the pane too small. What is the proper way to do this?
02-11-2013 09:33 AM - edited 02-11-2013 09:33 AM
The FP panel bounds info is relative to the location of it in the monitor and the splitter location is relative to the pane. So you need to find the pane size first. I did this by subtracting the bounds in the attached example. Second it appears as though the splitter can’t be any further to the right than 26 pixels less than the size of the pane; I figured this out just by manually playing with it. The same goes for the left the smallest it can be is 18 and since it is relative to the pane I am assuming your definition of collapsed will be setting the left side to 18 as in my example. Note this was just a quick example and you need to add proper error handling and what not.
Hope this helps
02-11-2013 10:05 AM
Thanks but in my app, I keep getting an error 1358 - The splitter bar cannot be moved to thisa position because it violates a minimum or maximum size of a pane. I even used your code in my event structure for the pushbutton.
What is odd is that I dont have any minimum pane sizes specified anywhere. Any clue as to what could be causing this to occur?
02-11-2013 01:04 PM
@id wrote:
Thanks but in my app, I keep getting an error 1358 - The splitter bar cannot be moved to thisa position because it violates a minimum or maximum size of a pane. I even used your code in my event structure for the pushbutton.
What is odd is that I dont have any minimum pane sizes specified anywhere. Any clue as to what could be causing this to occur?
The minimum size of a pane is set by the width of the scrollbar (even if it is not visible) and this width is OS dependant. In Herrlin code the splitter position is set to 18 in the case "Collapse Left Pane", 17 seems to be the default scrollbar thickness in Windows 7 so you have to add 1 more pixel to avoid overlap (I think it bacause of the right minus left operation). Now the splitter position set the position of the left side of a splitter bar that's why the value of the splitter position in the "Collapse Right Pane" event is set to 26 (that is 18 px for the scrollbar + 8 px the default splitter width). If you make the splitter thicker you will get the same error.
You can deal with variable splitter bar width with the following code:
Ben64
02-20-2015 03:33 AM
02-20-2015 02:22 PM
I always have a hard time finding this. I buried it in my harddrive a while ago and I don't remember where I found it. Any way I think it was once called Messing around with Splitters, or Fun with Splitters, now I have it named Messing around with sliding a splitter.
In any case it is a demo that shows how panes can be collapsible.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
02-23-2015 01:16 AM
04-12-2018 02:31 AM
@Hooovahh
I am trying to implement similar splitters functionality in my VI as per implemented in the example you provided (Messing around with splitters pane demo.zip). I recently started using Splitters so I wanted to use it without OOPS concept. How can i do that?
04-12-2018 07:33 AM
What's wrong with object oriented design and classes? And why does a lack of knowledge of classes prevent you from using this functionality? I think the demo is pretty easy to understand from the high level. Just provide the inputs to Init regarding the object references, call the manager, and when done call the close. That being said if I would have made this from scratch I wouldn't have went as class happy as this developer.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-26-2018 02:37 PM
I would like to use some of the demo code in a project? Do you know who the author is? Is it released under any king of license? Thanks.