2016-04-27 16:22 GMT+02:00 Martin Schreiber <[email protected]>:
> git master d3c83b58ac422ee5b8e599c82a3f5ce50efe5335 has
> dco_nodisabledsortindicator and dco_wholecellsortclick.

Great!

> Please use T*Grid.DataCols[n].OnBeforeDrawcell, OnDrawCell or OnAfterDrawCell:
> "
> procedure tmainfo.drawcell(const sender: tcol; const canvas: tcanvas;
>                var cellinfo: cellinfoty);
> begin
>  if cellinfo.calcautocellsize then begin
>   cellinfo.autocellsize.cx:= TheCellWidth;
>  end;
> end;
> "
> "const" has been changed to "var" for OnDrawCell.

Should I use all events or pickup one? This code seems to work but
size is not correct (looks like 1/3 of expected width):

procedure TGenericListWidget.DrawTitle(const sender: tcol;
  const canvas: tcanvas; var cellinfo: cellinfoty);
var r: PMusicTag;
begin
  with cellinfo,cell do begin
    r := FPlaylist[row];
    if calcautocellsize then
      autocellsize.cx:= textrect(canvas, r^.Title).cx;
    drawtext(canvas,r^.Title,innerrect,[tf_ycentered,tf_ellipseright]);
  end;
end;

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to