Dynamic List Row Height

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
adrian.bustillo
Posts: 11
Joined: Thu Mar 16, 2017 5:14 pm

Dynamic List Row Height

Post by adrian.bustillo » Wed Oct 03, 2018 11:11 am

Hi,

I am trying to achieve a dynamic height for the list that a column contains a design (Reusable Part object) same like when the list contains a field. See image below.

Basically this is my code for the list that contains Design:
Define_Com Class(#PRIM_LIST) Name(#List1) Displayposition(3) Left(100) Parent(#COM_OWNER) Tabposition(3) Top(80) Height(720) Width(200) Rowsizing(Individual) Rowresize(True) Rowheight(22)
Define_Com Class(#PRIM_LIST.Part) Name(#ColumnASBLISTD1) Columnwidth(200) Design(#listdesign) Displayposition(1) Parent(#List1) Cellsizing(ContentHeight) Cellwidth(120) Columnunits(Proportion)

Is there a possible work around? I even try using tree view but they are the same out put as #list1.
list dynamic height.PNG
list dynamic height.PNG (18.84 KiB) Viewed 1394 times
Thanks for any response I can get.

RomainM
Posts: 19
Joined: Wed May 18, 2016 1:37 am
Location: France

Re: Dynamic List Row Height

Post by RomainM » Wed Oct 03, 2018 11:07 pm

Hi,

How do you resize your RP?

It seems to work fine with the folowing code:

Code: Select all

Begin_Com Role(*EXTENDS #PRIM_PANL *implements #Prim_List.iListCellDesign *ListFields #ListFields) Displayposition(1) Left(0) Tabposition(1) Top(0) Layoutmanager(#Layout1)

Define_Com Class(#PRIM_TBLO) Name(#Layout1) Sizing(ContentHeight)
Define_Com Class(#PRIM_TBLO.Row) Name(#Layout1Row1) Displayposition(1) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Layout1Column1) Displayposition(1) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Item) Name(#Layout1Item1) Column(#Layout1Column1) Manage(#Label1) Parent(#Layout1) Row(#Layout1Row1) Sizing(ContentHeightFitToWidth)

Define_Com Class(#PRIM_LABL) Name(#Label1) Caption('Label1') Displayposition(1) Ellipses(Word) Height(21) Left(0) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(15) Verticalalignment(Center)

End_Com

davidbalansa
Posts: 51
Joined: Mon Feb 01, 2016 10:08 am
Location: Australia

Re: Dynamic List Row Height

Post by davidbalansa » Thu Oct 04, 2018 6:43 am

Hi RomainM,

I am also interested in getting this to work. I am able to resize the reuable part without issue using fit to content height. But when plugging it into the prim_list the row height does not change. Could you please provide the code for the component containing the list to go along with the reusable code you posted.

Regards

RomainM
Posts: 19
Joined: Wed May 18, 2016 1:37 am
Location: France

Re: Dynamic List Row Height

Post by RomainM » Thu Oct 04, 2018 10:38 pm

Hi David,

Did you define the list like Adrian:

Define_Com Class(#PRIM_LIST) Name(#List1) Displayposition(3) Left(100) Parent(#COM_OWNER) Tabposition(3) Top(80) Height(720) Width(200) Rowsizing(Individual) Rowresize(True) Rowheight(22)
Define_Com Class(#PRIM_LIST.Part) Name(#ColumnASBLISTD1) Columnwidth(200) Design(#listdesign) Displayposition(1) Parent(#List1) Cellsizing(ContentHeight) Cellwidth(120) Columnunits(Proportion)

Regards

adrian.bustillo
Posts: 11
Joined: Thu Mar 16, 2017 5:14 pm

Re: Dynamic List Row Height

Post by adrian.bustillo » Tue Oct 09, 2018 10:53 am

Hi RomainM,

Wow! It worked like a charm. Big Thanks!
RomainM wrote:
Wed Oct 03, 2018 11:07 pm
Hi,

How do you resize your RP?

It seems to work fine with the folowing code:

Code: Select all

Begin_Com Role(*EXTENDS #PRIM_PANL *implements #Prim_List.iListCellDesign *ListFields #ListFields) Displayposition(1) Left(0) Tabposition(1) Top(0) Layoutmanager(#Layout1)

Define_Com Class(#PRIM_TBLO) Name(#Layout1) Sizing(ContentHeight)
Define_Com Class(#PRIM_TBLO.Row) Name(#Layout1Row1) Displayposition(1) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Layout1Column1) Displayposition(1) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Item) Name(#Layout1Item1) Column(#Layout1Column1) Manage(#Label1) Parent(#Layout1) Row(#Layout1Row1) Sizing(ContentHeightFitToWidth)

Define_Com Class(#PRIM_LABL) Name(#Label1) Caption('Label1') Displayposition(1) Ellipses(Word) Height(21) Left(0) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(15) Verticalalignment(Center)

End_Com

Post Reply