event handling and notebook pages

Hi,

In an application I am working on, I have a frame which contains a notebook. I create pages of the notebook using panels. In one of my panels for instance I have a class derived from a treectrl and within the treectrl-derived class I set an event handler that uses one of the classes methods as the event handler. I noticed that if I set the event handler in the treectrl before the panel gets added to the notebook everything is fine but if I add the panel to the notebook and then later set the event handler for the treectrl, the event handler function does not get called. Can anyone offer an explanation for this?

Thank you
Brian

···

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

I use wxNotebook, wxPanel and wxTreeCtrl in my application as well,
so I am quite interested in the problem you describe, but I can't
reproduce it. Could you send a short code sample that demonstrates
the problem? Also, what versions and operating system are you
using?

···

--- Brian Luft <theavidskier@msn.com> wrote:

In an application I am working on, I have a frame which contains
a notebook. I create pages of the notebook using panels. In one
of my panels for instance I have a class derived from a treectrl
and within the treectrl-derived class I set an event handler
that uses one of the classes methods as the event handler. I
noticed that if I set the event handler in the treectrl before
the panel gets added to the notebook everything is fine but if
I add the panel to the notebook and then later set the event
handler for the treectrl, the event handler function does not
get called. Can anyone offer an explanation for this?

=====
Donnal Walter
Arkansas Children's Hospital

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.