cancel
Showing results for 
Search instead for 
Did you mean: 

Lost_Focus problem

Former Member
0 Kudos

hi all,


If pVal.ColUID = "tspent" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_LOST_FOCUS then

dim i,z as integer
-------------
-----------

For iCnt = 1 To oMatrix.RowCount - 1
objTab = oMatrix.Columns.Item("tspent").Cells.Item(iCnt).Specific()
oMatrix.Columns.Item("tspent").Cells.Item(iCnt).Specific.value = objTab.Value.ToString 
         

in last line it's not executing next statement it's again going to the top line as lost_focus event occurs...i want to execute the next line.can ant body give me solution

iam using lost focus because of pressing tab key in matrix..

regards,

shangai.

Accepted Solutions (0)

Answers (1)

Answers (1)

Nussi
Active Contributor
0 Kudos

Hi,

you can try using this

If pVal.ColUID = "tspent" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_LOST_FOCUS

And pVal.InnerEvent = False And pVal.BeforeAction = False then

EDIT 2 times

btw i guess you should try using

For iCnt = 1 To oMatrix.RowCount

without minus 1

lg David

Edited too often by: David Nussböck on Oct 9, 2008 2:44 PM

Former Member
0 Kudos

hi david,

when i use this line....it's not at all firing when i press tab key


If pVal.ColUID = "tspent" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_LOST_FOCUS
And pVal.InnerEvent = False And pVal.BeforeAction = False then

when i keep innerEvent=true...it's executing.....but the problem exists as ded lock occurs..........

regards,

shangai.

Edited by: shangai Nights on Oct 9, 2008 3:22 PM

Nussi
Active Contributor
0 Kudos

ok Shanghai,

sorry - i forgot there's no innerevent for lostfocus - forgive me

looks like you have to create your own variable for this to stop the "dead loop"

i give the variable the name "looprunning" of type bool.

be sure looprunning is false when you start the addon


If pVal.ColUID = "tspent" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_LOST_FOCUS
And looprunning = False And pVal.BeforeAction = False then

looprunning = true

' do your matrix loop

looprunning = false

end if

this should prevent the deadlock.

you might give this a try

lg David