05-04-2017 05:00 AM
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 ? 😞
Solved! Go to Solution.
05-04-2017 07:44 AM - edited 05-04-2017 07:45 AM
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
05-05-2017 03:55 AM
Thank you.
Regards