Showing results for 
Search instead for 
Did you mean: 

Combo box scaling problem.

I have set scale objects with window on. Everthing looks good except the combo box controls. They don't seem to be scaling properly, and the control actually gets moved everytime you resize the window. Any ideas?
0 Kudos
Message 1 of 11
Hi Les,

Could you provide some screenshots pointing to where the control isn't scaling properly and where the control is getting moved. What version of LabVIEW is this as well? Thanks
0 Kudos
Message 2 of 11

I have the same problem, see attached example.

I got a solution too, place a string control in the same location, it scales correctly, then using event structure, every panel resize, read the string control position and size and update the combobox position and size.


0 Kudos
Message 3 of 11

Resizing is usually an issue and has never worked perfectly.  A few things I have found useful:

1.Best solution, but by far most work- Handle the layout in your resize event case

2.  Design the layout at the SMALLEST allowed screen size and use the minimum window size to enforce this.  When controls are scaled down and back up there is truncating of pixels and the control doesnt return to the original size.


3.  Consider using groupings and locking of controls this can help.


4.  Leave space between controls especially text lables

5.  Splitters allow you to resize all controls on one pane while leaving other panes unscaled.  Keeping a pane simple helps predict the resize behaviors.



I wish that NI would redo this behavior since I have spent many hours using work arounds to accommodate resizable windows.  Some features that resizing lacks are anchors, docking, borders and independant axis resizing.  Ideally there would be properties for to specify a control's relationship to its VI layout.  I have written some simple vis to handle this but it should be provided by the labview control or at least in a vi library.



Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 4 of 11

My biggest problem arises from users changing the three default fonts on their machine. This causes many controls to get bigger, and the whole layout gets messed up. My application fits on a 1024x768 screen using the default font and I want to keep it that way.

I thought I could turn on 'window resizing while scaling all objects', but that doesn't seem possible programmatically. This is what I wanted to do, anyone see a way to do this?

- upon launch read ini file, and set window size, while scaling all objects.

- check size and position of controls, if they don't fit in the window (this can happen if the user changed the font) turn off 'scaling of objects' and resize window.

- turn on 'window resizing while scaling all objects', so that user can enlarge window if that is desired, while maintaining the layout.

- save window size in .ini file


0 Kudos
Message 5 of 11
I dont like allowing font changes either (main fonts are MS San Serif I avoide system/app/dialog) because results are unpredictable.
All this is accessable via property nodes.  Controls[] will allow you to get Pos and size of controls, you can get and set the scake mode.  You can set the size of the window bounds.  All is possible but scaling controls are still hard.  I still have bad luck ysing the scale all controls with FP.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 6 of 11

I have this problem in LabVIEW 2017. 10 years after the original posting and this still has not been fixed!


I am using Nils_Gokemeijer's solution to place a string control in the same location which resizes itself properly and then resize the combo boxes every time the window is resized to the size and placement of the string control. This appears to be a valid workaround except that the drop-down icon of the combo box does not get placed correctly. I am using the combo box from the "Silver" pallet.


Any ideas? I have not been able to find property nodes for the placement and size of the drop-down icon but maybe I am just missing it.

0 Kudos
Message 7 of 11

This is problem I struggled with years ago...and honestly, I don't remember how I got it to work, but it does. Try the attached control using Nils method.

Message 8 of 11

Thanks mastaflash. Your control seemed to resize properly using Nils method.


I would prefer to use the combo box from the Silver pallet if possible since it matches the theme of everything around it in my applications. I'm guessing maybe you did some editing of the control to get it to work properly or just that its components are so square, that makes it work better. Any other ideas?

0 Kudos
Message 9 of 11

Sorry, but I was never able to get the silver combo to do what I wanted in the end. So I live with that control looking a little different. That said, one might be able to customize it to look closer to silver...

0 Kudos
Message 10 of 11