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!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.