LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

to change size of text while changing the panel size

i have placed only a string indicator on the front panel, while i resize the front panel, the indicator resize and also text font should be resize , how to do this...?

 

also i am interested to display the font like seven segment display.

 

 

Regards,
Balaji DP
0 Kudos
Message 1 of 6
(4,312 Views)

I'll have to think about how to expand fonts to track screen size expansion, but for seven segment displays, do a search of this forum with the key words "seven segment font" or "seven segment display"

 

Two possible answers are:      http://forums.ni.com/t5/LabVIEW/28-segment-display-with-decimal-point/m-p/799488#M364855

and:   http://digital.ni.com/public.nsf/allkb/5DCD38A1D020155386256DA9007DF506

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 6
(4,306 Views)

Hello Mr. Putnam Monroe,

                                                 Thanks, i will wait for your reply

Regards,
Balaji DP
0 Kudos
Message 3 of 6
(4,298 Views)

iam waiting for your reply........ 

 

i need a big numeric indicator.. also if i change my panel size it should adjust to full screen size

Regards,
Balaji DP
0 Kudos
Message 4 of 6
(4,243 Views)

Hi Balaji,

 

use property nodes (instead of relying on LabVIEW's internal scaling routine:

- read the panel size

- calculate the needed fontsize and size of the string indicator

- set indicator size and font size of the string display...

 

Why do you wait for another reply of Putnam? He already gave you food for thoughts...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 6
(4,238 Views)

Hi Balaji,

 

I had a similar request from a customer for this type of functionality. In that case, there were 6 items that needed

to be controlled. For that project, I used an array of values for all of the indicators/controls. It worked, but it

was clumsy to code and the user interface wasn't ideal (as the FP was resized, it would jump to the next size in the

array - not terrible - but not smooth).

 

When I saw your request it was a good excuse to look at this again and see if there was a better solution.

 

The first thing you need to understand is how the Resize Event works:

 

The Panel Resize event always runs at least twice.
First with old and new Panel Bnds being different and then (when dragging stops) with old and new Panel Bnds being

equal.

 

So given that functionailty, you can start to define the tasks that need doing and where to put them.

 

- Soapbox mode on -
Experimentation is a key factor in learning/using LabVIEW. Put in probes, use highlight execution, really try to

understand how the code is running. Build incrementally and verify that each part works as expected. Ask questions

and try to do what people suggest. Embrace these things and you will be able to answer most LabVIEW questions. [This

is more productive than "waiting" :)]
- Soapbox mode off -

 

After following my own advice and doing some experiments, I came up with the attached example.

 

In the example program, the indicator and font are resized when you drag the FP edge. When resizing is complete, the

FP bounds are adjusted to match the indicator. This gives a smooth response while dragging and provides visual

feedback of the font size you will have when you stop dragging.


Program Notes:

 

o No error handling - this should be added
o The "magic numbers" for calculating Width and Height will need adjustment for your application
o Be sure to test that the maximum number of characters to be displayed will fit in the indicator
o Select a specific font for the indicator so the app will look right on different OS versions
  (Don't forget that "Application Font" is not the same on WinXP and Win7)

 

---

 

The "good" and the "not so good" about using an LED font:

 

The "good" - it's easy to set up - just install an LED font, restart LabVIEW and use the new font.

The "not so good" - you have to install the LED font on each taget machine where the program is used. If for some

reason the font is not installed, the result may not be usable (for example - numbers too large for indicator). Of

course you could read the actual font with property nodes and adjust things accordingly, but that is a complication.

---

steve

www.AshfordSolutions.com

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
Message 6 of 6
(4,207 Views)