DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Report

Solved!
Go to solution

I wrote a script that allows me to decrease the size of a text that is in the masterlayout of my report ('text5' in the image),  so I set two conditions for this, the first when The length of my text exceeds 29, the text decreases by 1, and when the length is greater than 29, the size takes the value 2.5. My problem is that once the decrease is made with the new value, the master layout registers this new value and so I can not return to the initial value, for example, if I have an initial size = 4 and That it becomes 3, thereafter I will have the value 3 which becomes 2 while I would still like to have again the size 4 which becomes 3. any ideas pease ? 😞

0 Kudos
Message 1 of 3
(2,517 Views)
Solution
Accepted by topic author say12

Hi say,

 

It sounds like you'd be better served with explicit character length ranges that correspond with absolute font sizes, something like this:

Chars = Len(Text5)
IF Chars < 29 THEN
  oCtrl.Font.Size = 4
ElseIF Chars < 35 THEN
  oCtrl.Font.Size = 3
ElseIF Chars < 41 THEN
  oCtrl.Font.Size = 2
ELSE
  oCtrl.Font.Size = 1
END IF

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 2 of 3
(2,480 Views)

Thank you.

Regards

0 Kudos
Message 3 of 3
(2,457 Views)