Skip to Content
avatar image
Former Member

Re:Lost focus event

Hi all,

I have written some code in lost focus event.But the lost focus event is not firing.i didn't set any filters.please help me to sollve my problem.

Regards

Mohana

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 15, 2008 at 09:10 AM

    hi,

    it's not possible for the event to be fired without writing any filters

    Public Sub SetFilter()

    Dim objFilters As SAPbouiCOM.EventFilters

    Dim objFilter As SAPbouiCOM.EventFilter

    objFilters = New SAPbouiCOM.EventFilters

    objFilters.Add(SAPbouiCOM.BoEventTypes.et_LOST_FOCUS)

    objFilter.AddEx("PIT")

    SetFilter(objFilters)

    End Sub

    insert this in ur code

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      try this

      If pVal.ItemUid = "Uid" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_LOST_FOCUS And pVal.BeforeAction = False and pval.charpressed=9 Then

      end if

      '9' is the item which gets fired when tab is pressed

      it's better to write keydown if ur using tab

      and coming to firing a event i gave the code before._refere to ur previous replie's_

  • avatar image
    Former Member
    Oct 15, 2008 at 09:09 AM

    hi,

    if u r validating use validate event rather than lost focus

    If pVal.BeforeAction = True And pVal.ItemUID="ItemUID" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_VALIDATE Then

    EndIf

    regards,

    varma

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 15, 2008 at 09:35 AM

    Hi Mohana,

    Post your code sample for lost focus event.. whether your event got fired or not?

    sample:

    If pVal.ItemUid = "Uid" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_LOST_FOCUS And pVal.BeforeAction = False Then

    your validations .....

    Endif

    Regards,

    Ganesh k

    Add comment
    10|10000 characters needed characters exceeded