From 94df12fa1f16b27ef7a8445f9316f46b3e08c6d0 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Fri, 4 Dec 2009 21:37:01 +0000 Subject: [PATCH] Enable auto scrolling in data- and query grid(s) when mouse is used to select rows. Fixes issue #849. --- source/main.dfm | 4 ++++ source/main.pas | 1 + 2 files changed, 5 insertions(+) diff --git a/source/main.dfm b/source/main.dfm index 81f61d90..ee83ad18 100644 --- a/source/main.dfm +++ b/source/main.dfm @@ -1174,6 +1174,7 @@ object MainForm: TMainForm Width = 575 Height = 228 Align = alClient + AutoScrollDelay = 50 EditDelay = 0 Header.AutoSizeIndex = -1 Header.DefaultHeight = 17 @@ -1186,6 +1187,7 @@ object MainForm: TMainForm LineStyle = lsSolid PopupMenu = popupDataGrid TabOrder = 2 + TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScroll, toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes] TreeOptions.MiscOptions = [toAcceptOLEDrop, toEditable, toFullRepaintOnResize, toGridExtensions, toInitOnSave, toToggleOnDblClick, toWheelPanning, toEditOnClick] TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toShowHorzGridLines, toShowVertGridLines, toThemeAware, toUseBlendedImages, toAlwaysHideSelection] TreeOptions.SelectionOptions = [toExtendedFocus, toFullRowSelect, toMultiSelect, toRightClickSelect] @@ -1381,6 +1383,7 @@ object MainForm: TMainForm Width = 575 Height = 206 Align = alClient + AutoScrollDelay = 50 EditDelay = 0 Header.AutoSizeIndex = -1 Header.DefaultHeight = 17 @@ -1392,6 +1395,7 @@ object MainForm: TMainForm LineStyle = lsSolid PopupMenu = popupResultGrid TabOrder = 1 + TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScroll, toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes] TreeOptions.MiscOptions = [toAcceptOLEDrop, toEditable, toFullRepaintOnResize, toGridExtensions, toInitOnSave, toToggleOnDblClick, toWheelPanning, toEditOnClick] TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toShowHorzGridLines, toShowVertGridLines, toThemeAware, toUseBlendedImages, toAlwaysHideSelection] TreeOptions.SelectionOptions = [toExtendedFocus, toMultiSelect, toRightClickSelect] diff --git a/source/main.pas b/source/main.pas index c828aba2..6b3c729c 100644 --- a/source/main.pas +++ b/source/main.pas @@ -8305,6 +8305,7 @@ begin QueryTab.Grid.Font.Assign(QueryGrid.Font); QueryTab.Grid.Header.ParentFont := QueryGrid.Header.ParentFont; QueryTab.Grid.WantTabs := QueryGrid.WantTabs; + QueryTab.Grid.AutoScrollDelay := QueryGrid.AutoScrollDelay; QueryTab.Grid.OnBeforeCellPaint := QueryGrid.OnBeforeCellPaint; QueryTab.Grid.OnFocusChanged := QueryGrid.OnFocusChanged; QueryTab.Grid.OnGetText := QueryGrid.OnGetText;