From: Bradley K. E. <bk...@bk...> - 2003-06-19 22:08:38
|
oops...ignore the double '$' in $$grid_event-> as it should be $grid_event-> Brad > -----Original Message----- > From: wxp...@li... > [mailto:wxp...@li...]On Behalf Of Bradley K. > Embree > Sent: Thursday, June 19, 2003 3:02 PM > To: Joe Youngquist > Cc: Wxperl-Users@Lists. Sourceforge. Net > Subject: RE: [wxperl-users] Grid event question (getRow, getCol) > > > The first argument is the object that 'owns' the event (this is how > I think of > it, it may not be the correct terminology to use). The first argument to an > EVT_* macro will be the first argument to the callback sub. > > The second argument to the callback will be an event object which, in this > case, provides the GetCol and GetRow methods. > > So: > > EVT_GRID_CELL_CHANGE( $this, \&callback_sub ); > > sub callback_sub { > my ( $this, $grid_event ) = @_; > > print "\nValue is: " . $this->{'GRID'}->GetCellValue( > $$grid_event->GetRow(), > $$grid_event->GetCol()); > } > > Brad > > ps Are you looking to get the cell value when the value of the cell > changes or > when the user changes the active cell? > > -----Original Message----- > From: wxp...@li... > [mailto:wxp...@li...]On Behalf Of Joe Youngquist > Sent: Thursday, June 19, 2003 2:39 PM > To: wxp...@li... > Subject: [wxperl-users] Grid event question (getRow, getCol) > > > Hello all, > > > Well, I'm on my way converting a Win32::Gui app to wxPerl and I've > bumped into > a snag. > > I'm trying to get the value of a cell when it changes. > > EVT_GRID_CELL_CHANGE($this, sub {print "\nValue is: " . > $this->{GRID}->GetCellValue(GetRow,GetCol);}); > > What the problem is the GetRow and GetCol so that I can send > GetCellValue the > cell that fired off the cell change event... > > Also, in the doc's all the event shows is a func call, but in the demo and > under the grid demo more specifically, there are two params for the > EVT..._CHANGE. the first being ? and the second the function to use/call. > > What is the first param exactly....please be aware that my brain is still > trying to come to grips that all of this is OOP and I'm not familiar at all > with wxWindows - be gentle :) > > > JY > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: INetU > Attention Web Developers & Consultants: Become An INetU Hosting Partner. > Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! > INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php > _______________________________________________ > wxperl-users mailing list > wxp...@li... > https://lists.sourceforge.net/lists/listinfo/wxperl-users |