

























fastreport 2023之后的版本在windows11(lazarus 4.4/4.6)报表设计时,如果文本框没完整显示文本框内容,鼠标在上面停放一会,会弹出以下错误信息(Position range overflow in .SendMoveSizeMessages: Left=19867780, Top=697,left的值超级大):

经排查发现是fr使用自定义hint引起的,这次修复只是治标,没从问题源头修复。
打开FastReport\FPC\Sources\frxDesgnWorkspace.pas,找到procedure TfrxDesignerWorkspace.RealHintShow(var Msg: TCMHintShow),然后按红色代码修改:
procedure TfrxDesignerWorkspace.RealHintShow(var Msg: TCMHintShow); var Header, PropText: String; HMemoView: TfrxCustomMemoView; begin if not (FLastObjectOver is TfrxCustomMemoView) then Exit; HMemoView := TfrxCustomMemoView(FLastObjectOver); if HMemoView.HasOutboundContent then begin Header := frxResources.Get('obText'); PropText := HMemoView.Text; Msg.HintInfo.HintStr :={$ifdef fpc} Header + LineEnding + {$endif}PropText; {$ifndef fpc}Msg.HintInfo.HintWindowClass := TDesgnHintWindow; Msg.HintInfo.HintData := TDesgnHintData.Create('', Header, False, HMemoView);{$endif} Msg.HintInfo.HideTimeout := MaxInt; end; end;
修改后重新编译就可以正常显示hint:

linux不报错,但显示的hint内容不完整:
修改后能完整显示[Customers."Contact"]

如果你有更好的修改方法,希望能和我分享,谢谢!
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。