sub new { my($class) = shift; my $this = $class->SUPER::new(undef, -1, 'test'); $this->{listctrl} = Wx::ListCtrl->new($this, -1, [0,0], [180,200]); $this->{listctrl2} = Wx::ListCtrl->new($this, -1, [200,0], [180,200]); $this->{listctrl}->InsertStringItem(0, 'foo'); $this->{listctrl}->InsertStringItem(1, 'bar'); EVT_LIST_BEGIN_DRAG($this->{listctrl}, $this->{listctrl}, \&OnDrag); EVT_LIST_BEGIN_DRAG($this->{listctrl2}, $this->{listctrl2}, \&OnDrag); return $this; }