hmmm.  never thought about this one, since i did not need to use it this way.
but i just checked delphi to see if this is the "standard" way that listboxes
are supposed to function - ie, a click event initiates a callback.  and it does.
so, is this a bug in win32::gui?




Patrick RENAUD <[EMAIL PROTECTED]> on 04/21/99 08:38:30 AM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:    (Sundar Raman/MW/US/3Com)
Subject:  [perl-win32-gui] ListBox click event and scrollbars




Hi folks,

I declare a ListBox with single selection and want to catch the click
event when the user select an item but nothing appears when I click on
an item of the box : the callback is not executed.

Does anybody try using this callback ? Is it a special declaration of
the listbox ?

An other problem is that I declare the ListBox with vertical and
horizontal scrollbars and only vertical scrollbar is displayed.

My code is :

     $mainWin->AddListbox(
           -name => "listBox",
           -left => 20,
           -top => 20,
           -width => 200,
           -height => 220,
           -style  => WS_VISIBLE | WS_VSCROLL | WS_HSCROLL,
     );

     sub listBox_Click {
           print "selected item =
          ".$mainWin->listBox->SelectedItem()."\n";
           print "selected text =

".$mainWin->listBox->GetString($mainWin->listBox->SelectedItem())."\n";
     }

I tried also with the DblClick event : same result (nothing is done).

Thanks for the help.
--
   _____________________________________
 /                                       \
|           Patrick RENAUD                |
|                                         |
|   [EMAIL PROTECTED]   |
 \_______________________________________/










Reply via email to