All I did was fix a couple errors....note the commented line and the
brackets.
I'm sort of surpsrised your perl let this one even execute.
Runs OK on my box.
Am using ActivePerl build 518. Use it if you don't have it...it's great.
Get it at www.activestate.com.

Good luck
Marty

see code below:





use Win32::GUI;

$Main1 = new Win32::GUI::Window(
          -name     => "MainWindow",
          -left     => 100,
          -top => 100,
          -width    => 300,
          -height => 200,
          -text     => ('Please provide the following information', 2),
          -style    => WS_BORDER | WS_CAPTION,
     );

$Main1->AddLabel(
          -name     => "StatusLabel",
          -left     => 10,
          -top => 50,
          -width    => 100,
          -height   => 22,
          -text     => "Status:"
     );

$Main1->AddListbox(
          -name     => "StatusText",
          -left     => 100,
          -top => 50,
          -width    => 100,
          -height   => 80
     );

$Main1->AddButton(
          -name     => "Enter",
          -left     => 90,
          -top => 140,
          -width    => 100,
          -text     => "Enter"
     );

$Main1->Show;

&FillListBox();

Win32::GUI::Dialog();

sub Status_Click
#{();-name
{
     print "Entered Status_Click\n";
}

sub Enter_Click
{
     return -1;
}

sub FillListBox
{
     $Main1->StatusText->AddString("DRAFT");
     $Main1->StatusText->AddString("IN REVIEW");
     $Main1->StatusText->AddString("DECISION");
     $Main1->StatusText->AddString("OFFICIAL");
}


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, July 27, 1999 7:39 AM
To: [EMAIL PROTECTED]
Subject: [perl-win32-gui] problem with list box #2


Hello all,

Sorry about that...I did not include the whole script.   I am doing that
now.

I am using Win32-GUI and have a listbox in my form.    I am having trouble
with
the Click Event of the listbox.    It appears that it's not working
correctly.
That is, no actions are being performed when I click in the listbox.      Is
this still a bug or has it been fixed?    Also, is there a workaround for
this?

I'm attaching my script.    Please email me if you have any questions.

Thanks in advance,
Felice

use Win32::GUI;

$Main1 = new Win32::GUI::Window(
          -name     => "MainWindow",
          -left     => 100,
          -top => 100,
          -width    => 300,
          -height => 200,
          -text     => ('Please provide the following information', 2),
          -style    => WS_BORDER | WS_CAPTION,
     );

$Main1->AddLabel(
          -name     => "StatusLabel",
          -left     => 10,
          -top => 50,
          -width    => 100,
          -height   => 22,
          -text     => "Status:"
     );

$Main1->AddListbox(
          -name     => "StatusText",
          -left     => 100,
          -top => 50,
          -width    => 100,
          -height   => 80
     );

$Main1->AddButton(
          -name     => "Enter",
          -left     => 90,
          -top => 140,
          -width    => 100,
          -text     => "Enter"
     );

$Main1->Show;

&FillListBox();

Win32::GUI::Dialog();

sub Status_Click {();-name
     print "Entered Status_Click\n";
}

sub Enter_Click {
     return -1;
}

sub FillListBox {
     $Main1->StatusText->AddString("DRAFT");
     $Main1->StatusText->AddString("IN REVIEW");
     $Main1->StatusText->AddString("DECISION");
     $Main1->StatusText->AddString("OFFICIAL");
}



Reply via email to