disable selecteditemchanged event

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ziver MALHASOGLU

    #1

    disable selecteditemchanged event

    Hello,

    i want to temporary disable the listBox object's selectedItemCha nged event.
    how can i achieve this?

    Regards,
    Ziver


  • Ignacio Machin \( .NET/ C#  MVP \)

    #2
    Re: disable selecteditemcha nged event

    Hi,

    You would need to keep a reference to the assigned handler:
    EventHandler listboxhandler = new EventHandler( theHandlerMetho d );

    So you can enable it:

    listbox.Selecte dItemChanged += listboxhandler;

    or disable

    listbox.Selecte dItemChanged -= listboxhandler;

    at your will.


    Hope this help,

    --
    Ignacio Machin,
    ignacio.machin AT dot.state.fl.us
    Florida Department Of Transportation

    "Ziver MALHASOGLU" <ziver_alenm@ho tmail.com> wrote in message
    news:u$oP3jNwDH A.3416@tk2msftn gp13.phx.gbl...[color=blue]
    > Hello,
    >
    > i want to temporary disable the listBox object's selectedItemCha nged[/color]
    event.[color=blue]
    > how can i achieve this?
    >
    > Regards,
    > Ziver
    >
    >[/color]


    Comment

    Working...