Don’t wrap the caption values for fields

By | October 16, 2009

I came across this very interesting question on SAGE Accpac forum. The requirement was not to wrap the caption of the field on screen. We did some research to come across a feasible solution and thought why not share this with all and so here is the post on our blog.

Well the scenario is; suppose you have created a field with considerably long Caption value. Then you add this field to the screen in the same line where other fields also exist i.e. on the “same line”. Now after particular extent the caption value will be wrapped and moved to the next line automatically. Now suppose you don’t want to wrap the caption values of the fields on your screen in order to retain proper look and feel of the screen then what you can do? Here is the answer to your question.

There is the property named NOWRAP which can be associated with the TD elements of the HTML table. This takes values either as True or false. If it is true then the values will not be wrapped and vise and versa. But you cannot set this value at runtime as you do with other properties. In order to this at runtime, you may need to use script on screen something like given below.

Note: Here the NOWRAP property is applied to SPAN element, it can either be applied to TD element if required. The above script will apply this property to all the span elements matching criteria.

If you find this content useful, Please drop us an email at crm@greytrix.com.