07-14-2021 01:12 PM
As we know the Splitter bars are very handy in developing multi-pane UIs.
We might use them quite often in our applications.
This Splitter bars can be of different Styles each have their own appearance.
We can select the appropriate Splitter Style according to our requirement at edit time.
So I was playing with the VI Scripting to automate the process of creating VIs with multi-pane FP.
In the way of doing this, it was straight forward to create a Splitter bar into a VI FP with the required Splitter Style.
But once the Splitter is created, there is no Property or Invoke node available (as far as I searched) to actually access its style (including Scripting & Private options).
Is there any other way to access the Splitter Style ?
Solved! Go to Solution.
07-15-2021 05:05 AM
@Its_Me_Ashiq(ஆஷிக்) wrote:Is there any other way to access the Splitter Style ?
- Splitter Style: Read
- Splitter Style: Write
- Splitter Style: Set
- Splitter Style: Get
Pretty sure the short answer is no.
We've been over this not too long ago, although I can't find the thread.
You may have to get all info from panes (like objects on it) and splitters, then delete the splitters, create new splitters in correct style, put all objects on the correct pane. I'd opt out. It won't be fun. It might not even be possible...
Note that, IIRC, style can't be changed for any control, although I'd assume the "Replace" method works for controls (, but not for splitters 🤤).
07-15-2021 06:36 AM
No there isn't. LabVIEW front panel controls and other elements are implemented as classes. (Nowadays likely as C++ classes but in old times it was implemented as a class hierarchy in plain C code). And the styles are implemented as subclasses. Changing the style of an object means that you have to recreate the full object from scratch, there isn't just an attribute that can be changed, and that is represented in the absence of such a property in the class view for these objects.
07-15-2021 08:13 AM
It is a pity that the Replace method doesn't work for Splitters though.
It does work for controls.
It does feel like a bug to me, but I'm sure there are arguments against it.
07-15-2021 11:35 PM
Thank you everyone for the responses 👍.
I have some good news about this query.
Source code (LabVIEW 2020) for the Splitter Style implemented Pane Relief QD can be found here.
To view how it works, view this page.
07-16-2021 03:22 AM
It's nasty though. 😊
Manipulating the BD heap XML? I would (and did 🙄) use it, but wouldn't want to depend on it in any way.
07-16-2021 03:44 AM
We are not touching any of the Block Diagram resources here (so it does not create any dependency to the BD references 🙈).
Just manipulating the cosmetics of the required splitter in the FP Heap XML.
(similar to setting 0px size to splitter bar in the QD)
It does not modify the Splitter Hierarchy or anything but the cosmetic Style of the Splitter bar.
07-16-2021 04:17 AM
OK, FP Heap... just as bad.