Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Now I want to be able to write some information to a database when a cell is edited in my grid control.my $Child = $Window->{Client}->AddMDIChild ( -name => "Child".$ChildCount++, -title => $title, -onResize => \&ChildSize, ) or die "Child"; $Child->AddGrid ( -name => "Grid", -pos => [0, 0], -rows => 50, -columns => 10, -fixedrows => 1, -fixedcolumns => 1, -editable => 1, ) or die "new Grid";
I cant use the previous function because I don't know the handle to the childwindow. Is there a way for me to determine this without passing the handle myself. Which I can't do anyway since _EndEdit is a function of WIN32::GUI::Grid.pm.sub Grid_EndEdit { my ($row, $col) = @_; my $string=$Grid->GetCellText($row, $col); my $changeid=$Grid->GetCellText($row, 1); my $changeattribute=$Grid->GetCellText(0, $col); $dbh->do("UPDATE INV SET $changeattribute = ? WHERE CODE = ?" , un +def, $string, $changeid); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Obtaining References to Child Windows in Win32::Gui MDI
by bsdz (Friar) on Oct 20, 2004 at 12:50 UTC |