Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TreeView and Focusrect

Status
Not open for further replies.

Nordlund

Programmer
Jul 17, 2001
458
SE
Hi there.
How do I remove the Focusrect and the Select rectangle from a TTreeView?

I've tried to write an OnDrawItem procedure, but I cant get it to work...




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-"There is always another way to solve it, but I prefer my way.
 
I've added this code in then CusomDrawItem event.
But the Focusrect still remain.
The
Code:
var
  NodeRect: TRect;
begin
  with TTreeView(Sender).Canvas do
  begin
    NodeRect := Node.DisplayRect(true);

    Brush.Color := clWhite;
    FillRect(NodeRect);
    Font.Color := clBlack;
    end;
  end;
end;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-"There is always another way to solve it, but I prefer my way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top