VCL Delphi

Title: How to disable the TreeView Hint
Question: How to disable the TreeView Hint
Answer:
procedure HideTreeViewHint(hTreeView: THandle; bHide: bool = true);
begin
if bHide then
begin // Hide the Hint.
SetWindowLong(hTreeView, GWL_STYLE,
GetWindowLong(hTreeView,GWL_STYLE) or $80);
end else
begin // Show the Hint.
SetWindowLong(hTreeView, GWL_STYLE,
GetWindowLong(hTreeView,GWL_STYLE) and not $80);
end;
end;
Example:
// To Hide;
procedure TForm.HideClick(Sender: TObject);
begin
HideTreeViewHint(TreeView.Handle);
end;
// To Show
procedure TForm.HideClick(Sender: TObject);
begin
HideTreeViewHint(TreeView.Handle, false);
end;