Page 1 of 1

Data Editor for DevExpress does not work with Express Tree

Posted: Fri Mar 09, 2012 8:42 pm
by shinug
Hello,

The inplace editor for DevExpress works fine with Express Quantum Grid.
However it is not painting the text correctly when used with Express Quantum Treelist.

Is this a known issue?

I would like to add that i had ported the code of TcxTRichViewEdit and TcxDBTRichViewEdit to Delphi6 before using it. Do you think this might be the reason for not working correctly with TcxDBTreelist.

Best Regards,
Shinu

Posted: Sat Mar 10, 2012 11:19 am
by Sergey Tkachenko
We had not tested our editors with a treelist, only as a standalone editors and in grid. I'll test them later, however...
DevExpress component do not support D6. Did you port the whole DevExpress VCL suite to D6?

Posted: Sun Mar 11, 2012 3:45 am
by shinug
Hello Sergey,

Thanks for the reply.

I am using Express Quantum Grid Version 5 and Express Quantum Treelist version 4. These are compatible with Delphi 6.

I have found the problem. It is in the method TcxRVViewInfo.InternalPaint. Please refer to the code snippet given at the end of the message.

The statement R := ClientRect; always gives 0,0 as Top Left position in case of TcxTreelist. It gives correct values when used in Grid.

Because of this the text gets always gets drawn at point 0, 0.
If i change the statement to R := InnerEditRect; then it works correctly with treelist however gives wrong position for grid.

Any ideas on how to fix this.

Regards,
Shinu

procedure TcxRVViewInfo.InternalPaint(ACanvas: TcxCanvas);
var R: TRect;
begin
inherited;
if (FReportHelper=nil) or not IsInplace then
exit;
if not FUseDocColor then
FReportHelper.RichView.Color := BackgroundColor;
if not FUseDocFontColor then
FReportHelper.RichView.Style.TextStyles[0].Color := TextColor;

//This statement is giving problem.
R := ClientRect;
FReportHelper.Init(ACanvas.Canvas, R.Right-R.Left);
FReportHelper.FormatNextPage(MaxInt);
FReportHelper.DrawPageAt(R.Left, R.Top, 1, ACanvas.Canvas, True, R.Bottom-R.Top);

end;

Posted: Thu Mar 22, 2012 6:16 pm
by Sergey Tkachenko
Unfortunately, I do not know how to solve this problem.
It is not in the ClientRect. At least in the lastest version of DevExpress VCL + Delphi XE2 + Win7, the problem is in RVReportHelper.Init: it resets ACanvas.Canvas properties, and I do not know why.

So, unfortunately, the editors are not compatible with Treelist.

Posted: Thu Mar 22, 2012 7:12 pm
by Sergey Tkachenko
Well, a solution is found. A new version is uploaded.

Posted: Fri Mar 23, 2012 5:16 pm
by shinug
Hello Sergey,

Thanks for the fix.
I tried using it, however, i am getting a compiler error on line 892.

FReportHelper.RichView.Style.GraphicInterface.GetWindowOrgEx(ACanvas.Canvas, pt);

I am using Richview 10.
Seems like GraphicInterface class is not there in this version.

Is there a corresponding function or workaround in Richview 10?

Regards,
Shinu

Posted: Fri Mar 23, 2012 5:30 pm
by shinug
Hello Sergey,

Please ignore my previous message.
I fixed the issue by using GetWindowOrgEx method of Windows unit.

Thanks for the fix.
Its working correctly now.

Regards,
Shinu