Hallo,
ich habe hier mal unverschämterweise den Tipp von
Rakshasa in meinen Code eingebaut:
Delphi-Quellcode:
procedure TDemoForm.TreeDrawText(Sender: TBaseVirtualTree; TargetCanvas: TCanvas;
Node: PVirtualNode; Column: TColumnIndex; const Text: WideString; const CellRect: TRect;
var DefaultDraw: Boolean);
const
LINKCOLUMN = 2;
var
P: TPoint;
HotColumn: TColumnIndex;
begin
if ((Node = Tree.HotNode) and (toHotTrack in Tree.TreeOptions.PaintOptions)) then
begin
P := Tree.ScreenToClient(Mouse.CursorPos);
HotColumn := Tree.Header.Columns.ColumnFromPosition(P);
if ((Column = LINKCOLUMN) and (HotColumn = LINKCOLUMN)) then
TargetCanvas.Font.Style := TargetCanvas.Font.Style + [fsUnderline]
else
TargetCanvas.Font.Style := TargetCanvas.Font.Style - [fsUnderline];
end;
end;
Gruß Hawkeye