Hello all,
I have a silly question. I'm using Win32::GUI (version 0.1996.4.16). I
have a label and a button on a form. When I click on the button I want a
certain message placed in the text of the label. Here's a snippet of what
I have:
use Win32::GUI;
$Main1 = new Win32::GUI::Window(
-name => "MainWindow",
-left => 100,
-top => 100,
-width => 400,
-height => 300,
-text => ('Test', 2),
-style => WS_BORDER | WS_CAPTION,
);
$Main1->AddLabel(
-name => "Results",
-left => 10,
-top => 150,
-width => 100,
-height => 22,
-text => "Results=",
);
$Main1->AddButton(
-name => "EnterAll",
-left => 150,
-top => 240,
-width => 50,
-text => "Enter"
);
$Main1->Show;
Win32::GUI::Dialog();
sub EnterAll_Click {
$Main1->Results->Text =
$Main1->TypeText->GetString($Main1->TypeText->SelectedItem());
}
When I try to run this I will get the following message:
Can't modify subroutine entry in scalar assignment at guiex.pl line 76,
near ");"
Execution of guiex.pl aborted due to compilation errors.
FYI Line 76 is the $Main1->Results->Text line.
What am I doing wrong?
Felice