Determining the width of a formatted value/string: Difference between revisions

From Planimate Knowledge Base
Jump to navigation Jump to search
(Importing text file)
 
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<font face="Arial">The routine operation '''<font face="Arial">Formatted Width</font>'''<font face="Arial"> (in the Labels submenu) will return the width in characters that the target attribute/cell would take to display. This works for label and numerically formatted values.<br /><br /><font face="MS Sans Serif"><br /> </font></font></font>
The width of a string, label or formatted form of an attribute can be determined using the strlen() expression function along with an "="&nbsp;routine operation, eg:
----
 
[[Category:String]]
p.width = strlen(p.mytext)
[[Category:Format (Units)]]
 
[[Category:Routine]]
An older way to do this was using the routine operation '''FormattedWidth()'''
[[Category:Release Note]]
[[Category:Format_(Units)]] [[Category:Routine]] [[Category:Labellist]]
<font size="2">idkbase note 101</font>

Latest revision as of 19:55, 13 December 2013

The width of a string, label or formatted form of an attribute can be determined using the strlen() expression function along with an "=" routine operation, eg:

p.width = strlen(p.mytext)

An older way to do this was using the routine operation FormattedWidth()