PRIM_LIST ItemClick with Page Scroll

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
Posts: 656
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

PRIM_LIST ItemClick with Page Scroll

Post by jyoung » Thu May 02, 2019 1:52 am

I'm having a bizarre issue in VLWEB with the PRIM_LIST when the page is scrolled.

I am using the ItemClick event and what seems to be happening is that when the left mouse button is pressed, the page automatically scrolls down some.
This puts the mouse on a different item then the item that was clicked.
When the mouse button is released, the values associated with the item that is currently under the mouse are used.

This means that what the user is clicking on is not what the user is getting.

Using the ItemGotSelection event seems to prevent this.

Anyone else experience this and how to stop it?


Posts: 106
Joined: Wed Dec 02, 2015 10:06 am

Re: PRIM_LIST ItemClick with Page Scroll

Post by MarkDale » Tue May 07, 2019 11:04 am

It seems to work ok for me (under VL 142040).
Sometimes you can get unusual behaviour if the cache is not cleared or if there are multiple versions of VL.

Does the following example work ok for you?

Code: Select all

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

Define_Com Class(#PRIM_LIST) Name(#List1) Displayposition(1) Left(168) Parent(#COM_OWNER) Tabposition(1) Top(109) Width(521) Height(244)
Define_Com Class(#PRIM_LIST.String) Name(#List1Column1) Columnunits(Proportion) Columnwidth(1.35) Displayposition(1) Parent(#List1) Sortonclick(True) Source(#STD_TEXT)
Define_Com Class(#PRIM_LIST.Number) Name(#List1Column2) Columnunits(Proportion) Columnwidth(0.65) Displayposition(2) Parent(#List1) Sortonclick(True) Source(#STD_NUM)
Define_Com Class(#PRIM_LABL) Name(#Label1) Caption('Label1') Displayposition(2) Ellipses(Word) Height(25) Left(176) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Top(408) Verticalalignment(Center) Width(521)

Evtroutine Handling(#Com_owner.Initialize)
Clr_List Named(#List1)
Begin_Loop Using(#std_num) To(200)
#Std_text := #std_num.AsString
Add_Entry To_List(#List1)

Evtroutine Handling(#List1.ItemClick)
#Label1.Caption := #STD_TEXT

Post Reply