From 0780f4b56b04e95e76e32b7b8b7f9cf8073b1e75 Mon Sep 17 00:00:00 2001 From: vincents Date: Tue, 9 Jan 2007 10:41:00 +0000 Subject: [PATCH] LCL: added treeview option to disable expanding on double clicking a tree node. git-svn-id: trunk@10408 - --- lcl/comctrls.pp | 3 ++- lcl/include/listcolumns.inc | 2 ++ lcl/include/treeview.inc | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lcl/comctrls.pp b/lcl/comctrls.pp index da6a1fa0bc..ebacfe0670 100644 --- a/lcl/comctrls.pp +++ b/lcl/comctrls.pp @@ -2025,7 +2025,8 @@ type tvoShowLines, tvoShowRoot, tvoShowSeparators, - tvoToolTips + tvoToolTips, + tvoNoDoubleClickExpand ); TTreeViewOptions = set of TTreeViewOption; diff --git a/lcl/include/listcolumns.inc b/lcl/include/listcolumns.inc index 80a63d4972..f7e0fa7d9f 100644 --- a/lcl/include/listcolumns.inc +++ b/lcl/include/listcolumns.inc @@ -32,6 +32,8 @@ procedure TListColumns.BeginUpdate; begin {$IFNDEF VER2_0} inherited; + // if 2.0 is not supported anymore, maybe FUpdateCount can be removed and + // the Changed notification can be used. {$ENDIF} inc(FUpdateCount); end; diff --git a/lcl/include/treeview.inc b/lcl/include/treeview.inc index 38f8300587..3ccacdc50b 100644 --- a/lcl/include/treeview.inc +++ b/lcl/include/treeview.inc @@ -4267,7 +4267,8 @@ begin Include(fStates,tvsWaitForDragging); end; end else - if (ssDouble in Shift) and (Button = mbLeft) and (CursorNode<>nil) then + if not (tvoNoDoubleClickExpand in Options) and (ssDouble in Shift) + and (Button = mbLeft) and (CursorNode<>nil) then CursorNode.Expanded := not CursorNode.Expanded; end;