I found the solution I called
Panel.Controls.Clear() method to
remove the labels and links. That is why the controls were
not
disposed and their event handlers were not removed. So when
I added
new controls with same event handlers somehow it got
confused and the
click event did not work. Now I call
Panel.Control[i].Dispose() for
every control on the panel and add new controls and it works
great!
On 22 Žubat, 11:06, "moonie"
<serafettina... gmail.com> wrote:
> I have an msn style c# windows application with a form
and panel on
> it.
> A news list is drawn from the database and dynamically
added via
> labels, link lables during form loading. In this
application at run
> time this list should be generated again as the
filtering criteria
> changes. So I clear the controls(labels) on the panel,
get the list
> from the database and generate the list again. The list
is created
> and
> it works fine. But sometimes the form begins not to
respond to mouse
> clicks. Only mouse over and mousemove events work. Does
anybody have
> suggestions on why this happens?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharp googlegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribe googlegroups.com
For more options, visit this group at http://g
roups.google.com/group/C_Sharp?hl=en
-~----------~----~----~----~------~----~------~--~---
|