Hello all,

I have just been pouring through the mailing list archives, as well as 
UseNet, and Google, and I just can't figure out to read the selected 
values in a multi-select listbox, when my Next Button is pushed.  Here is 
my code snippet of the window I have created:

    our $w1 = 500;
    our $h1 = 650;
    our $sitelist = Win32::GUI::Window->new(
                -name   => 'sitelist',
                -width  => $w1,
                -height => $h1,
                -text   => 'Select Sites',
                );
    our $sites = $sitelist->AddListbox(
                -name=>'Site List',
                -height=>550,
                -width=>460,
                -top=>20,
                -left=>20,
                -tabstop=>1,
                -addstyle=>0x00003,
                -font => $font,
                -addstyle => 0x00200000,
                -multisel => 2,
                );
    $sitelist->AddButton(
                -name => "Next",
                -text => "Next>>",
                -height  => 30,
                -width  => 85,
                -font => $font,
                -pos  => [ 395, 575 ],
                );
    my $siteloop;
    my $sitecount = @polarray;
    for ($siteloop=0; $siteloop<$sitecount; $siteloop++)
        {
            $sites->Add ( $polarray [$siteloop] );
        }
    $sitelist->Show();
    our $desk = Win32::GUI::GetDesktopWindow();
    our $dw = Win32::GUI::Width($desk);
    our $dh = Win32::GUI::Height($desk);
    our $x = ($dw - $w1) / 2;
    our $y = ($dh - $h1) / 2;
    $sitelist->Move($x, $y);
 
    sub Next_Click
    {
        our $locations = $sites->Text; #Borrow from pevious comboxbox 
code.  Probably wrong
        my $display = Win32::MsgBox ($locations);
    }

If anyone can provide me with some code samples on how to read multiple 
values from a list box, I wold greatly appreciate it.  Thanks in advance 
for your help.  I am still quite new to perl and especially to the 
Win32::GUI module.

Andy


____________________________
This message and any attachments may contain confidential or privileged 
information and are intended only for the use of the intended recipients of 
this message.  If you are not the intended recipient of this message, please 
notify the sender by return email, and delete this and all copies of this 
message and any attachments from your system.  Any unauthorized disclosure, 
use, distribution, or reproduction of this message or any attachments is 
prohibited and may be unlawful.
____________________________

Reply via email to