Page 1 of 1

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

Posted: Wed Sep 18, 2019 4:33 pm
by Taku Izumi
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

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

Posted: Thu Sep 19, 2019 2:57 pm
by MarkD
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

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

Posted: Tue Sep 24, 2019 11:32 am
by Taku Izumi
Hi Mark,

I got the expected result.

Thanks,
Taku