wxPython TreeCtrl bug ?

Nilesh Agarwalla nilesh at smalcamera.com
Thu Oct 31 18:46:21 EST 2002


"Uwe C. Schroeder" <uwe at oss4u.com> wrote in message news:<uq0lge5hhghucd at corp.supernews.com>...
> Hi,
> 
> I'm using the current development versions of wx*
> You can even use the demo code to test this. Obviously the wxTreeCtrl
> doesn't handle/emit/whatever all events anymore. EVT_TREE_SEL_CHANGED as 
> well as EVT_TREE_SEL_CHANGING are processed correctly under Linux, however 
> they don't show up under MSW. 
> My MSW is a 98 with the common controls upgraded.
> Versions are identical (both Linux and MSW as of yesterday on wxwindows.org 
> and wxpython.org)
> 
> Anyone else having this problem under MSW ?
> 
>         UC

I have fixed my problem on Win98.  I am writing a Unicode application
using Unicows for Win98 compatibility.  My problem was caused by the
fact that the UNICODE version of the Win98 native tree control returns
different messages than the non-UNICODE version.  I added handling for
both messages and my problem was solved.

I will be submitting the patch to wxWindows, but if you'd like to make
the change yourself:

In File: "wxWindows\src\msw\treectrl.cpp"

In Function: bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam,
WXLPARAM *result)

Replace:
 case TVN_SELCHANGED:
with:
 case TVN_SELCHANGEDW:
 case TVN_SELCHANGEDA:

AND

Replace:
 case TVN_SELCHANGING:
with:
 case TVN_SELCHANGINGW:
 case TVN_SELCHANGINGA:


Recompile wxWindows and it should work.

Regards.



More information about the Python-list mailing list