first:
my apologies to those who aren't interested in this discussion
(but i'm sure you
wouldn't be subscribed to a mailing list otherwise :)
i have
been working through the debug process on this problem and think
i have
an answer ...
if you
change the appropriate sections as indicated below, you can get a reaction
out of
the program
1) the GotFocus (GF) event handler
is much better than the 'Click' [EH]
because it
gets a response from the program (period)
if you watch
the results, you click on and recieve a -1
well, if you
click off the window and click on one of the list items
again you
recieve the index of the value you were on just a
moment
ago
-- it seems that if you run the program this way, you're always one
step behind
how to fix it
...
add the line:
my $ListSelection = $theListBox->SelectedItem();
... to a function that you plan on calling AFTER highlighting your
Listbox.
(if for example, you had to have a "submit" button for the for the user
after
they'd selected all their choices, place the above line in
there)
it's a
bit of a hack workaround i geuss ... but seeing as how the program does not seem
to
behave
intuitively it may simply be the way you have to do it for now
:)
hope
this helps :)!
-----Original Message-----
From: Chesser, Alex [CAR:C556:EXCH]
Sent: Thursday, June 15, 2000 9:55 AM
To: [EMAIL PROTECTED]
Subject: [perl-win32-gui]: working with a ListBox (Q&A with code, also a r easonable "hello world" level example)
sub TheListBox_ GotFocus {
my $ListSelection = $theListBox->SelectedItem();
print ",$ListSelection\n";
}