Octavian Rasnita wrote:
I need to use a Wx::CheckListBox under Windows, but it doesn't seem to work. I've tried:

$self->rss_sources(Wx::CheckListBox->new($self, -1, [20, 50], [300, 300]));

but it creates just a common Wx::ListBox that doesn't have check boxes.
This works for me on all platforms:
$self->{list_box_Permissions} = Wx::CheckListBox->new($self->{notebook_1_pane_2}, -1, wxDefaultPosition, wxDefaultSize, [], wxLB_NEEDED_SB);
$self->{list_box_Permissions}->Append("item_1");
$self->{list_box_Permissions}->Append("item_2");
$self->{list_box_Permissions}->Append("item_3");

I have also tried to use

$self->rss_sources->Check(1, 1);

but it doesn't do anything. No check box appears, and no error is given.

In the .chm manual I've read:

"When using this class under Windows wxWidgets must be compiled with USE_OWNER_DRAWN set to 1."

but unfortunately I don't know how to do that. Is the WxPerl version which can be installed with ppm using that compilation option?

On windows I'm using ActiveState perl 5.10.0 and installed the PPM's from http://wxperl.co.uk repository:
wxPerl: 0.85
wxWidgets: wxWidgets 2.8.8

Also note there's a working example in the Wx::Demo
Or maybe there is another problem?

Possible, but I suspect a simple syntax error somewhere.

Cheers,

Huub

Reply via email to