Hi,

I don't understand why appending items with client data to a
CheckListBox does not work on Windows.  This script:

     #!/usr/bin/perl
     package MyApp;
     use base 'Wx::App';
     use Wx qw(:everything);

     sub OnInit {
       my $frame  = Wx::Frame   -> new(undef, -1, 'demo',
       [-1, -1], [250, 150], );
       my $clb     = Wx::CheckListBox -> new($frame, -1,
       wxDefaultPosition, wxDefaultSize,
       []);
       $frame -> Show(1);
       $clb -> Append('a', [11, 12, 13]);
       $clb -> Append('b', [21, 22, 13]);
       $clb -> Append('c', [31, 32, 33]);
       $clb -> Append('d', [41, 42, 43]);
       $clb -> Append('e', [51, 52, 53]);
       1;
     };

     package main;
     use Wx qw(:everything);
     my $app = MyApp->new->MainLoop;

works fine on my linux machine, but hangs and eventually shows the
error reporting dialog on my Windows XP machine.  Replacing the
CheckListBox with a ListBox works.  So does a CheckListBox without
client data.  But CheckListBox + client data fails. :(

I am using Strawberry perl 5.12.2.0 and had CPAN install the latest
Alien::wxWidgets (wxWidgets 2.8.10) and Wx (0.98).

This does not appear to be related to the issue mentioned in the
wxWidgets documentation: "When using this class under Windows
wxWidgets must be compiled with USE_OWNER_DRAWN set to 1."  I say
that because an examination of the source code for wxWidgets 2.8.10
seems to have that defined as 1 in the include/wx/msw/ directory.

Any suggestions for how to work around or fix this problem with client
data on the CheckListBox?

Thanks!
B


-- 

 Bruce Ravel  ------------------------------------ bra...@bnl.gov

 National Institute of Standards and Technology
 Synchrotron Methods Group at NSLS --- Beamlines U7A, X24A, X23A2
 Building 535A
 Upton NY, 11973

 My homepage:    http://xafs.org/BruceRavel
 EXAFS software: http://cars9.uchicago.edu/~ravel/software/exafs/

Reply via email to