Example Code

Auto-size numeric control

Code and Documents

Attachment

Overview:
Programmatically adjust the widht of the control depending on the data value.

Description:
This code calculates how many digits the control value has and adjust the widht of the control by detecting when a change is made using the Event Structure Functionality.

Requirements:
LabVIEW 2012 (or compatible).

Steps to Implement or Execute Code:
1. Run the VI
2.Modify the value of the control by increasing or decreasing.

Additional Information or References:
Autosize Numeric Control - LV 2012 NI Verified.PNG
"**This document has been updated to meet the current required format for the NI Code Exchange.**".

Misha

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Todd S.
NI Employee (retired)
on

Thanks for posting!  Could you please rename your file to include the LabVIEW version (ie. "_lv86.vi")?

Todd S.
LabVIEW Community Manager
National Instruments
mishkin
NI Employee (retired)
on

whoops, put the version in the wrong title... first time

Misha