Hi,
Because you have no mechanism to deliver events to the dialog.
Try
$dlg->ShowModal();
OR
Start off an app
my $app = Wx::SimpleApp->new();
my $dlg = .... your code
$dlg->Show(1);
$app->MainLoop;
Though in second case you need to put code in $dlg to kill loop on exit.
Cheers
Mark
Foo JH wrote:
Hi all,
I'm wondering why my Wx::StaticText is not painted in my test dialog.
The following is the code I used:
my $dlg = Wx::Dialog->new(
$this,
-1,
'SMARTSync Dialog',
wxDefaultPosition,
[200,70],
);
my $MainSizer = Wx::BoxSizer->new(wxVERTICAL);
$dlg->SetSizer($MainSizer);
my $label = Wx::StaticText->new($dlg,-1,
"Can you read me?");
$MainSizer->Add($label,0,wxALL|wxGROW,5);
$dlg->Show(1);
The dialog window shows, but the part where the text should be painted
is transparent.
Any help is appreciated. Thanks.