On Saturday 22 October 2016 22:28:22 Krzysztof wrote:
> Mmm just noticed that my extra text is cut in subnodes (see attached
> screenshot). One char offset. This is my current code:
>
The shift value is in "variable.treelevelshift":
"
procedure TGenericNode.drawimage(const acanvas: tcanvas;
                         var alayoutinfo: listitemlayoutinfoty);
begin
 inherited drawimage(acanvas,alayoutinfo);
 if not alayoutinfo.variable.calcautocellsize then begin
  with alayoutinfo do begin
   dec(captioninnerrect.cx,variable.treelevelshift);
   dec(captionrect.cx,variable.treelevelshift);
   drawtext(acanvas,FExtraText,captioninnerrect,captionrect,
                          [tf_clipo,tf_ycentered,tf_right,tf_grayed]);
   inc(captioninnerrect.cx,variable.treelevelshift);
   inc(captionrect.cx,variable.treelevelshift);
  end;
 end;
end;
"

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to