home *** CD-ROM | disk | FTP | other *** search
- {*****************************************************************************
- *
- * TreeViewEx.pas - TTreeViewEx Component
- *
- * Copyright (c) 1998-99 Michael Haller
- *
- * Idea taken from Toolbox.
- *
- * Author: Michael Haller
- * E-mail: michael@discountdrive.com
- * Homepage: http://www.discountdrive.com/sunrise/
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- *
- *----------------------------------------------------------------------------
- *
- * Revision history:
- *
- * DATE REV DESCRIPTION
- * ----------- --- ----------------------------------------------------------
- *
- *****************************************************************************}
-
- unit TreeViewEx;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- ComCtrls, ExtCtrls;
-
- type
- TTreeViewEx = class(TTreeView)
- private
- { Private declarations }
- procedure WMNotify(var Message: TWMNotify); message WM_NOTIFY;
- protected
- { Protected declarations }
- public
- { Public declarations }
- published
- { Published declarations }
- end;
-
- procedure Register;
-
- implementation
-
- const
- TTN_FIRST = 0-520;
- TTN_NEEDTEXTW = TTN_FIRST - 10;
-
- procedure TTreeViewEx.WMNotify(var Message: TWMNotify);
- begin
- if Message.NMHdr^.Code = TTN_NEEDTEXTW then
- Message.Result := 1
- else
- inherited;
- end;
-
- procedure Register;
- begin
- RegisterComponents('Michael Haller', [TTreeViewEx]);
- end;
-
- end.
-