Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Yes, it's been cleaned a bit and optimized since my last post... thanks guys. My problem is in the "ComboBox" function, I want to do a getstring on whichever combobox made the call... Thanks again. Josh Pavel$accountName = ""; $count = 0; $top = 5; $left = 15; foreach my $row (1..222){ foreach my $col (1..5){ if ($col eq 1 && $accountName !~ $Sheet->Cells($row,$col)->{'V +alue'}){ $accountName = $Sheet->Cells($row,$col)->{'Value'}; $accounts[$count] = $accountName; if ($count eq 9 || $count eq 18) { $left += 150; $top = 5; } $labels[$count] = $main->AddLabel( -text => $accountName, -top => $top, -left => $left ); $top += 15; $comboboxes[$count] = $main->AddCombobox( -name => $accountName."ComboBox", -top => $top, -left => $left, -width => 125, -height => 150, -tabstop => 1, -style => WS_VISIBLE | 3 | WS_VSCROLL ); $count++; $top += 25; } else { if ($col eq 2){ $value = $Sheet->Cells($row,$col)->{'Value'}; $comboboxes[$count-1]->InsertItem($value); } } } } $Book->Close; sub ComboBox{ #Help here - this.$selection = GetString(SelectedItem); ??? } foreach my $x (0..$count){ $SUB = $accounts[$x]."ComboBox_Change"; *$SUB = \&ComboBox; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: "this" variable?
by Abigail-II (Bishop) on May 30, 2002 at 18:53 UTC | |
by tomhukins (Curate) on May 30, 2002 at 19:19 UTC | |
by Anonymous Monk on May 30, 2002 at 20:09 UTC | |
by Ovid (Cardinal) on May 30, 2002 at 20:31 UTC | |
by jsprat (Curate) on May 30, 2002 at 21:25 UTC | |
by Abigail-II (Bishop) on Jun 03, 2002 at 09:08 UTC | |
|
Re: "this" variable?
by jsprat (Curate) on May 30, 2002 at 21:07 UTC |