I use small cells (13x13 pixels) in my TStringGrid, and the 
InpalceEditor (which I use it now) is also small, so I need to replace 
it with something bigger.

Please tell me if the OnClick worked in your Delphi because in mine is 
working.
It is so strange that OnClick is working and OnChange is not.

Somebody with a version of Delphi higher than 7 can confirm if the bug 
was fixed?
Maybe is finally the time to buy Delphi 2005.
Anyway, Delphi 7 started to behave very strange in the last month and 
the IDE editor crashed more often than usual.

They say that Delphi is the most RAD tool. Maybe it will be true if its 
IDE will be not so damn buggy.
(This does not mean that I will not buy/upgrade Delphi anymore :)




Horváth Márton wrote:
> Hi,
>
>   I have tried your sample, and I found the same (in D7). I think the guilty 
> is the StringGrid descendant, who is the parent of the TEdit. It steal the 
> Change message from the Edit. You can use the OnKey.... events (it is so 
> ugly), or (more confortable) the TInPlaceEdit descendant instead the TEdit.
>   In the TInPlaceEdit descendant you can override the protected methods: 
> UpdateContents, Click, DblClick as you wish.
>
> regards.: m.
>
> ----- Original Message ----- 
> From: "CubicDesign" <[EMAIL PROTECTED]>
> To: <delphi-talk@elists.org>
> Sent: Thursday, November 16, 2006 1:13 PM
> Subject: Bug in Delphi?
>
>
>   
>> *Dear List   * :)
>>
>> I created my own custom TStringList VCL and now I want to add a better
>> editor to it. I want to let the user to enter the text in a TEdit
>> control, positioned right above the cell.
>> For this, I want to create at run time a TEdit control. All is nice and
>> beautiful until I want to assign an event to TEdit.OnChange. It does not
>> assign:
>>
>>
>> TYPE
>>  TBGrid= class(TStringgrid)
>>   Private
>>     ...
>>   protected
>>     Editor: TEdit;     { Custom InPlace Editor in StringGrid }
>>   End;
>>
>>
>> constructor TBGrid.Create;
>> begin
>>  inherited Create(AOwner);
>>  Editor:= TEdit.Create(Self);
>>  Editor.Parent   := Self;
>>  Editor.OnChange := Edit2Change;       <- this is working
>>  Editor.OnClick     := Edit2Change;       <- doesn't assign
>> bla bla bla
>> End;
>>
>>
>> procedure TBGrid.Edit2Change(Sender: TObject);
>> begin
>>  Bip(5000, 200);
>> end;
>>
>>
>>
>> I put the StringGrid on a form, I run the program. The Editor shows.
>> If I click on it, it beeps. If I type a char in it, it does not beep.
>>
>>
>>
>> __________________________________________________
>> Delphi-Talk mailing list -> Delphi-Talk@elists.org
>> http://www.elists.org/mailman/listinfo/delphi-talk
>>
>>
>>     
>
> __________________________________________________
> Delphi-Talk mailing list -> Delphi-Talk@elists.org
> http://www.elists.org/mailman/listinfo/delphi-talk
>
>   
__________________________________________________
Delphi-Talk mailing list -> Delphi-Talk@elists.org
http://www.elists.org/mailman/listinfo/delphi-talk

Reply via email to