TAdvTreeView multiline column header

Is it possible to have a multiline column header, without necessarily using word-wrap. I've tried putting CR, LF and CRLF in the Column.Text property, but this doesn't seem to work.
Ideally, I'd like the column header to display something like this:

BCHM
Business Contract Hire (with
maint)

So BCHM on the first line, then Business Contract Hire (with maint) on the 2nd line (but wordwrapped if the column isn't wide enough)

You can do this by implementing the following event: OnBeforeDrawColumnText

procedure TForm21.AdvTreeView1BeforeDrawColumnText(Sender: TObject;
  AGraphics: TAdvGraphics; ARect: TRectF; AColumn: Integer;
  AKind: TAdvTreeViewCacheItemKind; AText: string; var AAllow: Boolean);
begin
  AAllow := False;
  AGraphics.DrawText(ARect, AText, True);
end;

Perfect! Thank you, Pieter.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.