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
Data Editor for DevExpress does not work with Express Tree
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
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;
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;
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
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.
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.
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
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
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