How to set position #List.Currentitem on Popup panel (RESOLVED)

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
Taku Izumi
Posts: 19
Joined: Thu Dec 15, 2016 2:03 pm

How to set position #List.Currentitem on Popup panel (RESOLVED)

Post by Taku Izumi » Wed Sep 18, 2019 4:33 pm

HI,

I am using the VerticalscrollTo method of #PRIM_LIST on the popup panel, but this method doesn't work correctly.
How can I make it?
This is my sample.

Web page

Code: Select all

Begin_Com Role(*EXTENDS #PRIM_WEB) Theme(#SYS_THEME<MaterialDesignBlue>)

Define_Com Class(#POPUP01) Name(#POPUP01) Left(67) Parent(#COM_OWNER) Top(43)
Define_Com Class(#PRIM_PHBN) Name(#Button1) Caption('Button1') Displayposition(1) Left(546) Parent(#COM_OWNER) Tabposition(1) Top(58)

Evtroutine Handling(#Button1.Click)
#POPUP01.OPEN
Endroutine
End_Com

Popup panel

Code: Select all

Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_PPNL) Caption('Caption') Closebutton(True) Left(0) Height(300) Titlebar(True) Top(0) Width(400) Layoutmanager(#Layout1)

Define_Com Class(#PRIM_TBLO) Name(#Layout1)
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) Alignment(TopCenter) Column(#Layout1Column1) Manage(#List1) Parent(#Layout1) Row(#Layout1Row1)

Define_Com Class(#PRIM_LIST) Name(#List1) Displayposition(1) Left(0) Parent(#COM_OWNER) Tabposition(1) Top(30) Height(268) Width(398)
Define_Com Class(#PRIM_LIST.Number) Name(#List1Column1) Columnunits(Proportion) Columnwidth(1) Displayposition(1) Parent(#List1) Sortonclick(True) Source(#STD_NUM)

Evtroutine Handling(#COM_OWNER.CreateInstance)
Begin_Loop Using(#STD_NUM) To(100)
Add_Entry To_List(#List1)
End_Loop
Endroutine

Mthroutine Name(OPEN)
Get_Entry Number(50) From_List(#List1)
#List1.VerticalScrollTo Item(#List1.CurrentItem) Scrollposition(Top)
#COM_OWNER.ShowPopup
Endroutine

End_Com

Regards,
Taku

MarkD
Posts: 630
Joined: Wed Dec 02, 2015 9:56 am

Re: How to set position #List.Currentitem on Popup panel

Post by MarkD » Thu Sep 19, 2019 2:57 pm

Try

Code: Select all

Mthroutine Name(OPEN)
#COM_OWNER.ShowPopup
Get_Entry Number(50) From_List(#List1)
#List1.VerticalScrollTo Item(#List1.CurrentItem) Scrollposition(Top)
Endroutine

Taku Izumi
Posts: 19
Joined: Thu Dec 15, 2016 2:03 pm

Re: How to set position #List.Currentitem on Popup panel

Post by Taku Izumi » Tue Sep 24, 2019 11:32 am

Hi Mark,

I got the expected result.

Thanks,
Taku

Post Reply