VL Grid

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
nic.hall
Posts: 18
Joined: Sat Jan 16, 2016 4:23 am

VL Grid

Post by nic.hall »

Is there any way to wrap the caption in a grid column?
User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: VL Grid

Post by Stewart Marshall »

There's no wrapping as such, but you can set the CaptionType to use the field column headings which will give you up to 3 lines.

Regards
Stewart Marshall

Independent IT Consultant
www.marshallfloyd.com.au
HamadSheikh
Posts: 27
Joined: Fri Mar 18, 2016 3:49 am
Location: USA
Contact:

Re: VL Grid

Post by HamadSheikh »

This seems to work for a VL Grid.
#STD_BIN is a binary field.

Evtroutine Handling(#com_owner.Initialize)
Set Com(#com_owner) Caption(*component_desc)
Use Builtin(HEXTOBIN) With_Args('0D') To_Get(#STD_BIN)
#GridColumn1.caption := 'This is' + #std_bin.AsString + 'a Test'
Endroutine
User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: VL Grid

Post by Stewart Marshall »

Ha...Thanks Hamad

I'd forgotten about embedding carriage returns. We added it for hints originally to make the hint of a Compile job more interesting when there are multiple objects being compiled.

A slightly more elegant version is to use (13).AsChar

Code: Select all

#Column.Caption := "Line1" + (13).AsChar + "Line2" + (13).AsChar + "Line3"
In a similar vein, xDemoTraceHandlerDesktop use (09).AsChar to embed a Tab character when constructing a text file.

Regards
Stewart Marshall

Independent IT Consultant
www.marshallfloyd.com.au
Post Reply