Page 1 of 1

PRIM_LIST ItemClick with Page Scroll

Posted: Thu May 02, 2019 1:52 am
by jyoung
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?


Re: PRIM_LIST ItemClick with Page Scroll

Posted: Tue May 07, 2019 11:04 am
by MarkDale
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