Page 1 of 1

New line in List data

Posted: Wed Mar 28, 2018 1:41 am
by pbellardita
Hi,
is there a way to force a new line inside a list cell?
for example, in this web page, I used the command (10).asUnicodeString in the caption of the columnHeader and in the column # Col1.

Code: Select all

Begin_Com Role(*EXTENDS #PRIM_WEB) Layoutmanager(#TableLayout1)
Define_Com Class(#PRIM_TBLO) Name(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Column1) Displayposition(1) Parent(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row1) Displayposition(2) Parent(#TableLayout1) Height(1,81)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row2) Displayposition(1) Parent(#TableLayout1) Height(0,19)
Define_Com Class(#PRIM_TBLO.Item) Name(#List1Item1) Manage(#lista) Parent(#TableLayout1) Row(#Row1) Column(#Column1)
Define_Com Class(#PRIM_LIST) Name(#lista) Displayposition(1) Left(0) Parent(#COM_OWNER) Tabposition(1) Top(76) Height(724) Width(1200) Columnheaderheight(45)
Define_Com Class(#PRIM_LIST.String) Name(#Col1) Displayposition(1) Parent(#lista) Source(#STD_TEXT) Columncaptiontype(Caption)


Evtroutine Handling(#Com_owner.Initialize)
Define_Com Class(#prim_dc.UnicodeString) Name(#CarriageReturn)
#CarriageReturn := (10).AsUnicodeString /* Hex 0A */

#WRK_testo := 'Descr_1' + #CarriageReturn + 'Descr_2' + #CarriageReturn + 'Descr_3'
#Col1.ColumnCaption := #WRK_testo

Clr_List Named(#lista)
#STD_TEXT := 'row_1_1' + #CarriageReturn + 'row_1_2' + #CarriageReturn + 'row_1_3'
Add_Entry To_List(#lista)
#STD_TEXT := 'row_2_1' + #CarriageReturn + 'row_2_2' + #CarriageReturn + 'row_2_3'
Add_Entry To_List(#lista)
Endroutine
End_Com
the displayed result has new lines only in the Header.
Cattura.PNG
Cattura.PNG (2.77 KiB) Viewed 5122 times

How can I apply the same concept on every record in the list?

Thanks

Re: New line in List data

Posted: Wed Mar 28, 2018 8:47 am
by JamesDuignan
Hi,

Yes this is possible, first you will have to set the Column word wrap property to true.

i.e.

Code: Select all

Define_Com Class(#PRIM_LIST.String) Name(#Col1) Displayposition(1) Parent(#lista) Source(#STD_TEXT) Columncaptiontype(Caption) WordWrap(True)
Regards,
James

Re: New line in List data

Posted: Wed Mar 28, 2018 5:21 pm
by pbellardita
it works!

Thanks James

Regards