Data Editor for DevExpress does not work with Express Tree

General TRichView support forum. Please post your questions here
Post Reply
shinug
Posts: 7
Joined: Thu Dec 15, 2005 11:12 am

Data Editor for DevExpress does not work with Express Tree

Post 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
Sergey Tkachenko
Site Admin
Posts: 17572
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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?
shinug
Posts: 7
Joined: Thu Dec 15, 2005 11:12 am

Post 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;
Sergey Tkachenko
Site Admin
Posts: 17572
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17572
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Well, a solution is found. A new version is uploaded.
shinug
Posts: 7
Joined: Thu Dec 15, 2005 11:12 am

Post 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
shinug
Posts: 7
Joined: Thu Dec 15, 2005 11:12 am

Post 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
Post Reply