Page 1 of 1

Prim_List Column events

Posted: Tue Dec 06, 2016 6:57 am
by atostaine
I have a PRIM_LIST.Number and I don't see changed or lostfocus.

The list entry has qty, unit of measure, price, total. I would like to recalculate anytime any of those fields are changed. I normally use gotfocus and lostfocus instead of changed because I don't need to calculate on every key stroke.
available events
available events
item.png (5.15 KiB) Viewed 4531 times
Thanks, Art

Re: Prim_List Column events

Posted: Tue Dec 06, 2016 7:27 am
by Stewart Marshall
Hi Art

Focus events belong to the list as a whole rather than individual columns.

Changed processing is at item level.

Regards

Code: Select all

Begin_Com Role(*EXTENDS #PRIM_WEB) Height(465) Width(857)
Define_Com Class(#PRIM_LIST) Name(#List1) DisplayPosition(1) Left(16) Parent(#COM_OWNER) TabPosition(1) Top(7) Height(442) Width(825)
Define_Com Class(#PRIM_LIST.Number) Name(#ColumnSTD_PRICE1) ColumnWidth(102) DisplayPosition(1) Increment(1) Parent(#List1) Source(#STD_PRICE) Wrap(False) ColumnReadOnly(False)
Define_Com Class(#PRIM_LIST.Number) Name(#ColumnSTD_COUNT1) ColumnWidth(101) DisplayPosition(2) Increment(1) Parent(#List1) Source(#STD_COUNT) Wrap(False) ColumnReadOnly(False)
Define_Com Class(#PRIM_LIST.Number) Name(#ColumnSTD_AMNT1) ColumnWidth(122) DisplayPosition(3) Increment(1) Parent(#List1) Source(#STD_AMNT) Wrap(False)

Evtroutine Handling(#COm_owner.CreateInstance)
Inz_List Named(#List1) Num_Entrys(10)
Endroutine

Evtroutine Handling(#List1.ItemChanged)

#Std_amnt := #Std_price * #Std_count
Upd_Entry In_List(#List1)

Endroutine

*Evtroutine Handling(#List1.ItemLostFocus)

*#std_amnt := #Std_price * #std_count
*Upd_Entry In_List(#List1)

*Endroutine

End_Com