Bypassing Events

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rex the Strange

    Bypassing Events

    Hello All,

    I don't know if this is possible, but I'll give it a shot, here. I'm
    sick of writing the following line of code in control event handlers:


    if not visible then exit sub


    Is it possible to override whichever routine processes the event
    handler list so that no events are fired if the control is not
    visible?
    Something like this, for example:


    protected overrides sub handle_events
    if visible then mybase.handle_e vents
    end sub 'handleEvents


    Of course, I know that there's no handle_events routine, but is there
    an equivalent?

    Please advise and tia,

    rts
  • =?Utf-8?B?YnJ1Y2UgYmFya2Vy?=

    #2
    RE: Bypassing Events

    if you subclassed the control, then you could add this logic to the control,
    not everywhere the control is used.

    -- bruce (sqlwork.com)


    "Rex the Strange" wrote:
    Hello All,
    >
    I don't know if this is possible, but I'll give it a shot, here. I'm
    sick of writing the following line of code in control event handlers:
    >
    >
    if not visible then exit sub
    >
    >
    Is it possible to override whichever routine processes the event
    handler list so that no events are fired if the control is not
    visible?
    Something like this, for example:
    >
    >
    protected overrides sub handle_events
    if visible then mybase.handle_e vents
    end sub 'handleEvents
    >
    >
    Of course, I know that there's no handle_events routine, but is there
    an equivalent?
    >
    Please advise and tia,
    >
    rts
    >

    Comment

    • Rex the Strange

      #3
      Re: Bypassing Events

      On Nov 7, 3:34 pm, bruce barker
      <brucebar...@di scussions.micro soft.comwrote:
      if you subclassed the control, then you could add this logic to the control,
      not everywhere the control is used.
      >
      -- bruce (sqlwork.com)

      Could you clarify, please? Where would I add the logic (ie: under
      which parent handler)?

      Comment

      Working...