This forum is temporaily read-only. All existing discussions remain available for reference. For new questions, bug reports or support requests, please contact us at mail@lmdsupport.com.

Fix ElTree.pas

Please add following check in TCustomElTree.MeasureCellText

 if Item.IsHTML and (Copy(SText, 1, 6) = '<html>') then
 begin
    begin
          if not Assigned(FView.FRender.Data) then                                  // <- Begin Modification
          begin
            if ColumnNum = FView.Owner.FMainTreeCol then
              htmldata := Item.FHTMLData
            else
            begin
              if Item.FHTMLDataArray <> nil then
                if ColumnNum <= FView.Owner.FMainTreeCol then
                  htmldata := TLMDHTMLData(Item.FHTMLDataArray[ColumnNum])
                else
                  htmldata := TLMDHTMLData(Item.FHTMLDataArray[ColumnNum-1])
              else
                htmldata := nil;
            end;

            if Assigned(htmldata) then
              FView.FRender.SetData(htmldata);
          end;                                                                                               // <- End Modification

          with FView.FRender do
            if Assigned(Data) then                                                                   // <- Add Extra Check
            begin
              Data.DefaultStyle := Canvas.Font.Style;
              Data.DefaultFont  := Canvas.Font.Name;
              Data.DefaultHeight := Canvas.Font.Height;
              Data.Charset      := Canvas.Font.Charset;

              PrepareText(SText, MaxWidth, Item.WordWrap and Item.Multiline);
              R3.Right := Data.TextSize.cx;
              R3.Bottom := Data.TextSize.cy;
            end;



Comments

Sign In or Register to comment.