Hi Monks,
I have problem to get the Wx::DatePickerCtrl work properly. When I don't use "use Wx qw/:allclasses/;", then I will get error like "Error while autoloading 'Wx::wxDP_DROPDOWN'" for the following code:
#!/usr/bin/perl -w
use strict;
package MyApp;
#use Wx qw[:allclasses];
use Wx qw[:misc :frame :datepicker];
use Wx::DateTime;
use base qw(Wx::App);
sub OnInit {
my $self = @_;
my $frame = Wx::Frame->new(
undef,
-1,
'A wxPerl App',
wxDefaultPosition,
wxDefaultSize,
wxDEFAULT_FRAME_STYLE | wxMAXIMIZE_BOX | wxCLOSE_BOX
);
Wx::DatePickerCtrl->new($frame, -1, new Wx::DateTime(), wxDefaultP
+osition, wxDefaultSize, wxDP_DROPDOWN);
$frame->Center();
$frame->Show();
}
MyApp->new()->MainLoop();
However, I don't want "use Wx qw/:allclasses/" as it will load too many controls than necessary.
Please help figure out how to fix this problem. Thank you very much!