On Fri, 17 Jun 2005 09:38:15 +0700 bungsuputra linan <blinan@xxxxxxxxxxxxx>
wrote:
Hello,
> I am using Wx::Grid and I want the editor to show immediately when the
> cell is selected. Is it possible? I have tried this code below with no luck.
>
> Wx::Event::EVT_GRID_SELECT_CELL($this, sub {
> my($this,$event)=@_;
> my $editor = $this->{'grid'}->GetCellEditor($event->GetRow,
> $event->GetCol);
> $editor->Show(1);
> $event->Skip();
> });
The code below Works For Me (note that calling EnableCellEditControl
in idel time is necessary, it will no work in the cell selection event).
my $flag;
Wx::Event::EVT_IDLE( $this, sub {
return unless $flag;
$this->EnableCellEditControl;
$flag = 0;
});
Wx::Event::EVT_GRID_SELECT_CELL( $this, sub {
my( $this, $event ) = @_;
$flag = 1;
$event->Skip();
});
HTH
Mattia
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|