From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-05-2016 03:36 PM
Hello Labview specialists
I do use many listboxes on a front panel and populate them using the item names property node.
As I want my front panel objects to adapt to the current monitor resolution I have tick the 'Maintain proportions...' and 'Scale all objects...' options in VI properties. I also use a VI Property called Controls[] to set the Label.FontSize.
The problem is that those do not seem to impact my listbox item names and I am forced to individually use the Caption.FontSize and Label.FontSize property nodes which is awfully time consuming to program (in my case).
Has anyone found a trick to avoid going individually through this process?
Thanks a lot for all your suggestions
Christophe
Solved! Go to Solution.
09-05-2016 06:05 PM
1) you use item names property node every time rescaling or at the start? If first, you spend too much time for searching.
You can make cluster or array of links and use it.
2) use defer update property (for details see help)
09-05-2016 06:31 PM - edited 09-05-2016 06:31 PM
Also, if you want to change all rows at once, set active row to "-2". This will set the fonts all at once, including the Column Headers. But you can always change the headers back afterwards if they are different. This is a lot faster than looping through the rows.
Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner
09-05-2016 11:53 PM
Hello
I am rescaling only when entering the panel and use the ActiveRow=-2 method. Nevertheless I was hoping there existed a method to program a rescale of all my 50 ListBoxes at once.
Like the Panel/Controls[]/Label.FontSize that I use for labels (Controls[] gives me an array of Controls that feeds a for loop to change the Label.FontSize).
But I cannnot find anything to give me References type of all ListBoxes of my panel...
09-06-2016 12:18 AM
09-06-2016 12:25 AM
The -2 method is already what I use. I am just asking why I can get an easy method to get all references of my objects to change 'at once' (meaning in a single For loop) all my label font sizes AND NOT the same kind of method to change all my listboxs at once because I need to create the -2 method excplicitely for each of my 50 Listboxes. See attach for the snipet of my VI.
Thanks
09-06-2016 06:12 AM
If you want get array of links, why you can't collect it and store in shift register or local variable? Or just in wire.
Also you can use Class Id/name property for sorting Controls[] array elements.
09-06-2016 09:31 AM
I understand what you are saying and yes I can get the ClassName and ClassID of each of my controls. BUT the Control Refnum that enters your FOR Loop is generic and when connected to a Property icon it will not make available the corresponding properties of the element to which the Refnum is associated to.
In other words: the Refnum in your FOR Loop will correspond to ListBox, Ring, String,... each one having other properties but the Properties listed will only be the generic one. For instance I do not see the CellFontSize or AutoRowHt in the possible properties...
I do not know how to 'case' the property node properties based on the ClassName or ClassID...
09-06-2016 11:33 AM
09-06-2016 01:12 PM
@Christ0phe wrote:I understand what you are saying and yes I can get the ClassName and ClassID of each of my controls. BUT the Control Refnum that enters your FOR Loop is generic and when connected to a Property icon it will not make available the corresponding properties of the element to which the Refnum is associated to.
...
Oh, now I understand you.
Use to more specific class