Argh !

I'm using the CPAN Win32::GUI package (v.0.0.558).
I'm trying to use a combobox in one of my windows.
Right now, I've reduced the problem to the sniplet below,
and I'm using the
-style     => WS_VISIBLE | 3 | WS_VSCROLL | WS_TABSTOP
option when creating the combobox as I've found it in a couple
of threads on the net.

What am I doing wrong?
The combobox shows up with no items in it.

[code]
#!/usr/bin/perl

use Win32;
use Win32::GUI;

use strict;
use warnings;

my $mainWindow;

my $scheduleUpdateDialog;
my $ddmUpdateTimes;

my @availableTimes = ("1:00", "13:00");

MAIN:
   $mainWindow = new Win32::GUI::Window(
                                       -text => "Test",
                                       -name => "MainWindow",
                                       -pos  => [ 200, 400 ],
                                       -size => [ 400, 300 ]
                                       )
      or die("Could not initialize main window: $!");
   $ddmUpdateTimes = new Win32::GUI::Combobox(
                                             $mainWindow,
                                             -name    => "ddmUpdateTimes",
                                             -pos     => [10, 10],
                                             -size    => [290, 20],
-style => WS_VISIBLE | 3 | WS_VSCROLL | WS_TABSTOP
                                             )
      or die("Could not initialize Schedule Updates Dialog (Combobox): $!");
   $ddmUpdateTimes->Clear();
   $ddmUpdateTimes->Add("[no-updates]");
   foreach my $time (@availableTimes)
      {
      $ddmUpdateTimes->Add($time);
      }

   $mainWindow->Show();
   my $exitCode = Win32::GUI::Dialog();
   print STDERR "Exiting with code '$exitCode'.";
   exit(0);


sub MainWindow_Terminate
   {
   return -1;
   }

[/code]

Thanks in advance,
F.O.R.


Reply via email to