Popup on PRIM_LIST with Left Click

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

Popup on PRIM_LIST with Left Click

Post by jyoung »

I am trying to show a popup on a PRIM_LIST with a Left Click.
I can show it with the right click by setting the Popup property in the List, but I need it to be on the left click instead.

I've tried showing the popup in the ItemGotSelection event, but the popup instantly closes.

Code: Select all

evtroutine handling(#ReportList.ItemGotSelection)
#CMGSANObjectManager.avFrameworkManager.avRecordTrace component(#COM_OWNER) event("Item Got Selection")

#ReportListPopup.ShowPopup context(#COM_OWNER)
endroutine

evtroutine handling(#ReportListPopup.Prepare)
#CMGSANObjectManager.avFrameworkManager.avRecordTrace component(#COM_OWNER) event("ReportListPopup Prepare")
endroutine

evtroutine handling(#ReportListPopup.Closed)
#CMGSANObjectManager.avFrameworkManager.avRecordTrace component(#COM_OWNER) event("ReportListPopup Closed")
endroutine
The popup itself is pretty basic (its basically just a nav menu)

Code: Select all

define_com class(#PRIM_PPNL) name(#ReportListPopup) left(865) top(167) closeonclick(True) width(145) layoutmanager(#Layout4) height(50) autofocus(True)
define_com class(#PRIM_LABL) name(#Label1) caption('Client Burden') displayposition(1) ellipses(Word) height(25) left(0) parent(#ReportListPopup) tabposition(1) tabstop(False) top(0) verticalalignment(Center) width(143)
define_com class(#PRIM_LABL) name(#Label2) caption('Credit Control Panel') displayposition(2) ellipses(Word) height(25) left(0) parent(#ReportListPopup) tabposition(2) tabstop(False) top(25) verticalalignment(Center) width(143)
This is inside VLF-ONE, but its a normal PRIM_LIST component.
trace.PNG
trace.PNG (10.1 KiB) Viewed 12254 times
If I turn AutoClose off, the popup will stay open, but then I have to worry about closing it when the user does not select an item in the popup.

Any thoughts on getting a popup to work with left click?

Thanks,
Joe
Post Reply