>> Fastbase Business Software Ltd

Fastbase Accounting System - Online Manual

Wrapping long descriptions onto next line.

Document 105278/1

Entered Fri, 5 Aug 2005 11:43 by Peter Campbell
Updated Fri, 5 Aug 2005 11:47
Previous


# check length of description field, if longer than 30 chars then wrap it onto the next lineif {[string length $part(NAME)] >= 30} {

# wrap the description at 30 chars
set lines [system::wrap $part(NAME) 30]

# update the product description field
set part(NAME) [lindex $lines 0]

# set the "extra" line (below)
set extra "[lindex $lines 1]\n$extra"

# remove any trailing newline character
set extra [string trimright $extra \n]
}

field part(NAME) 16 50 -size 9

Online documentation: enter keywords to search for: