mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-14 01:56:36 +08:00
Enable variable node height in data and query grids. Customizable as number of lines per row. Fixes issue #1082.
This commit is contained in:
@ -80,6 +80,8 @@ const
|
|||||||
DEFAULT_MAXTOTALROWS = 100000;
|
DEFAULT_MAXTOTALROWS = 100000;
|
||||||
REGNAME_ROWSPERSTEP = 'DatagridRowsPerStep';
|
REGNAME_ROWSPERSTEP = 'DatagridRowsPerStep';
|
||||||
DEFAULT_ROWSPERSTEP = 1000;
|
DEFAULT_ROWSPERSTEP = 1000;
|
||||||
|
REGNAME_GRIDROWSLINECOUNT = 'GridRowLineCount';
|
||||||
|
DEFAULT_GRIDROWSLINECOUNT = 1;
|
||||||
REGNAME_REMEMBERFILTERS = 'RememberFilters';
|
REGNAME_REMEMBERFILTERS = 'RememberFilters';
|
||||||
DEFAULT_REMEMBERFILTERS = True;
|
DEFAULT_REMEMBERFILTERS = True;
|
||||||
REGNAME_LOGTOFILE = 'LogToFile';
|
REGNAME_LOGTOFILE = 'LogToFile';
|
||||||
|
@ -1228,12 +1228,12 @@ object MainForm: TMainForm
|
|||||||
PopupMenu = popupDataGrid
|
PopupMenu = popupDataGrid
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScroll, toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes]
|
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScroll, toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes]
|
||||||
TreeOptions.MiscOptions = [toAcceptOLEDrop, toEditable, toFullRepaintOnResize, toGridExtensions, toInitOnSave, toToggleOnDblClick, toWheelPanning, toEditOnClick]
|
TreeOptions.MiscOptions = [toAcceptOLEDrop, toEditable, toFullRepaintOnResize, toGridExtensions, toInitOnSave, toToggleOnDblClick, toWheelPanning, toVariableNodeHeight, toEditOnClick]
|
||||||
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toShowHorzGridLines, toShowVertGridLines, toThemeAware, toUseBlendedImages, toAlwaysHideSelection]
|
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toShowHorzGridLines, toShowVertGridLines, toThemeAware, toUseBlendedImages, toAlwaysHideSelection]
|
||||||
TreeOptions.SelectionOptions = [toExtendedFocus, toFullRowSelect, toMultiSelect, toRightClickSelect]
|
TreeOptions.SelectionOptions = [toExtendedFocus, toFullRowSelect, toMultiSelect, toRightClickSelect]
|
||||||
WantTabs = True
|
WantTabs = True
|
||||||
OnAfterCellPaint = DataGridAfterCellPaint
|
OnAfterCellPaint = DataGridAfterCellPaint
|
||||||
OnBeforeCellPaint = GridBeforeCellPaint
|
OnBeforeCellPaint = AnyGridBeforeCellPaint
|
||||||
OnBeforePaint = DataGridBeforePaint
|
OnBeforePaint = DataGridBeforePaint
|
||||||
OnChange = DataGridChange
|
OnChange = DataGridChange
|
||||||
OnCreateEditor = DataGridCreateEditor
|
OnCreateEditor = DataGridCreateEditor
|
||||||
@ -1243,10 +1243,11 @@ object MainForm: TMainForm
|
|||||||
OnEnter = ValidateControls
|
OnEnter = ValidateControls
|
||||||
OnExit = ValidateControls
|
OnExit = ValidateControls
|
||||||
OnFocusChanging = DataGridFocusChanging
|
OnFocusChanging = DataGridFocusChanging
|
||||||
OnGetText = GridGetText
|
OnGetText = AnyGridGetText
|
||||||
OnPaintText = GridPaintText
|
OnPaintText = AnyGridPaintText
|
||||||
OnHeaderClick = DataGridHeaderClick
|
OnHeaderClick = DataGridHeaderClick
|
||||||
OnKeyDown = GridKeyDown
|
OnInitNode = AnyGridInitNode
|
||||||
|
OnKeyDown = AnyGridKeyDown
|
||||||
OnMouseUp = DataGridMouseUp
|
OnMouseUp = DataGridMouseUp
|
||||||
OnNewText = DataGridNewText
|
OnNewText = DataGridNewText
|
||||||
Columns = <>
|
Columns = <>
|
||||||
@ -1436,15 +1437,16 @@ object MainForm: TMainForm
|
|||||||
PopupMenu = popupResultGrid
|
PopupMenu = popupResultGrid
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScroll, toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes]
|
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScroll, toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes]
|
||||||
TreeOptions.MiscOptions = [toAcceptOLEDrop, toEditable, toFullRepaintOnResize, toGridExtensions, toInitOnSave, toToggleOnDblClick, toWheelPanning, toEditOnClick]
|
TreeOptions.MiscOptions = [toAcceptOLEDrop, toEditable, toFullRepaintOnResize, toGridExtensions, toInitOnSave, toToggleOnDblClick, toWheelPanning, toVariableNodeHeight, toEditOnClick]
|
||||||
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toShowHorzGridLines, toShowVertGridLines, toThemeAware, toUseBlendedImages, toAlwaysHideSelection]
|
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toShowHorzGridLines, toShowVertGridLines, toThemeAware, toUseBlendedImages, toAlwaysHideSelection]
|
||||||
TreeOptions.SelectionOptions = [toExtendedFocus, toMultiSelect, toRightClickSelect]
|
TreeOptions.SelectionOptions = [toExtendedFocus, toMultiSelect, toRightClickSelect]
|
||||||
WantTabs = True
|
WantTabs = True
|
||||||
OnBeforeCellPaint = GridBeforeCellPaint
|
OnBeforeCellPaint = AnyGridBeforeCellPaint
|
||||||
OnFocusChanged = QueryGridFocusChanged
|
OnFocusChanged = QueryGridFocusChanged
|
||||||
OnGetText = GridGetText
|
OnGetText = AnyGridGetText
|
||||||
OnPaintText = GridPaintText
|
OnPaintText = AnyGridPaintText
|
||||||
OnKeyDown = GridKeyDown
|
OnInitNode = AnyGridInitNode
|
||||||
|
OnKeyDown = AnyGridKeyDown
|
||||||
Columns = <>
|
Columns = <>
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -593,13 +593,13 @@ type
|
|||||||
TColumnIndex; var Allowed: Boolean);
|
TColumnIndex; var Allowed: Boolean);
|
||||||
procedure DataGridFocusChanging(Sender: TBaseVirtualTree; OldNode, NewNode:
|
procedure DataGridFocusChanging(Sender: TBaseVirtualTree; OldNode, NewNode:
|
||||||
PVirtualNode; OldColumn, NewColumn: TColumnIndex; var Allowed: Boolean);
|
PVirtualNode; OldColumn, NewColumn: TColumnIndex; var Allowed: Boolean);
|
||||||
procedure GridGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column:
|
procedure AnyGridGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column:
|
||||||
TColumnIndex; TextType: TVSTTextType; var CellText: String);
|
TColumnIndex; TextType: TVSTTextType; var CellText: String);
|
||||||
procedure DataGridHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
procedure DataGridHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||||
procedure GridKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure AnyGridKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
procedure DataGridNewText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column:
|
procedure DataGridNewText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column:
|
||||||
TColumnIndex; NewText: String);
|
TColumnIndex; NewText: String);
|
||||||
procedure GridPaintText(Sender: TBaseVirtualTree; const TargetCanvas:
|
procedure AnyGridPaintText(Sender: TBaseVirtualTree; const TargetCanvas:
|
||||||
TCanvas; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType);
|
TCanvas; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType);
|
||||||
procedure menuDeleteSnippetClick(Sender: TObject);
|
procedure menuDeleteSnippetClick(Sender: TObject);
|
||||||
procedure menuExploreClick(Sender: TObject);
|
procedure menuExploreClick(Sender: TObject);
|
||||||
@ -660,7 +660,7 @@ type
|
|||||||
TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
|
TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
|
||||||
CellRect: TRect);
|
CellRect: TRect);
|
||||||
procedure menuShowSizeColumnClick(Sender: TObject);
|
procedure menuShowSizeColumnClick(Sender: TObject);
|
||||||
procedure GridBeforeCellPaint(Sender: TBaseVirtualTree;
|
procedure AnyGridBeforeCellPaint(Sender: TBaseVirtualTree;
|
||||||
TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
|
TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
|
||||||
CellPaintMode: TVTCellPaintMode; CellRect: TRect; var ContentRect: TRect);
|
CellPaintMode: TVTCellPaintMode; CellRect: TRect; var ContentRect: TRect);
|
||||||
procedure QueryGridFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex);
|
procedure QueryGridFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex);
|
||||||
@ -733,6 +733,8 @@ type
|
|||||||
procedure lblExplainProcessClick(Sender: TObject);
|
procedure lblExplainProcessClick(Sender: TObject);
|
||||||
procedure actDataShowNextExecute(Sender: TObject);
|
procedure actDataShowNextExecute(Sender: TObject);
|
||||||
procedure actDataShowAllExecute(Sender: TObject);
|
procedure actDataShowAllExecute(Sender: TObject);
|
||||||
|
procedure AnyGridInitNode(Sender: TBaseVirtualTree; ParentNode,
|
||||||
|
Node: PVirtualNode; var InitialStates: TVirtualNodeInitStates);
|
||||||
private
|
private
|
||||||
FDelimiter: String;
|
FDelimiter: String;
|
||||||
FileNameSessionLog: String;
|
FileNameSessionLog: String;
|
||||||
@ -812,6 +814,7 @@ type
|
|||||||
prefMaxColWidth: Integer;
|
prefMaxColWidth: Integer;
|
||||||
prefGridRowcountStep: Integer;
|
prefGridRowcountStep: Integer;
|
||||||
prefGridRowcountMax: Integer;
|
prefGridRowcountMax: Integer;
|
||||||
|
prefGridRowsLineCount: Word;
|
||||||
prefCSVSeparator: String;
|
prefCSVSeparator: String;
|
||||||
prefCSVEncloser: String;
|
prefCSVEncloser: String;
|
||||||
prefCSVTerminator: String;
|
prefCSVTerminator: String;
|
||||||
@ -1281,6 +1284,7 @@ begin
|
|||||||
prefMaxColWidth := GetRegValue(REGNAME_MAXCOLWIDTH, DEFAULT_MAXCOLWIDTH);
|
prefMaxColWidth := GetRegValue(REGNAME_MAXCOLWIDTH, DEFAULT_MAXCOLWIDTH);
|
||||||
prefGridRowcountMax := GetRegValue(REGNAME_MAXTOTALROWS, DEFAULT_MAXTOTALROWS);
|
prefGridRowcountMax := GetRegValue(REGNAME_MAXTOTALROWS, DEFAULT_MAXTOTALROWS);
|
||||||
prefGridRowcountStep := GetRegValue(REGNAME_ROWSPERSTEP, DEFAULT_ROWSPERSTEP);
|
prefGridRowcountStep := GetRegValue(REGNAME_ROWSPERSTEP, DEFAULT_ROWSPERSTEP);
|
||||||
|
prefGridRowsLineCount := GetRegValue(REGNAME_GRIDROWSLINECOUNT, DEFAULT_GRIDROWSLINECOUNT);
|
||||||
actDataShowNext.Hint := 'Show next '+FormatNumber(prefGridRowcountStep)+' rows ...';
|
actDataShowNext.Hint := 'Show next '+FormatNumber(prefGridRowcountStep)+' rows ...';
|
||||||
// Fix registry entry from older versions which can have 0 here which makes no sense
|
// Fix registry entry from older versions which can have 0 here which makes no sense
|
||||||
// since the autosetting was removed
|
// since the autosetting was removed
|
||||||
@ -3596,6 +3600,23 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TMainForm.AnyGridInitNode(Sender: TBaseVirtualTree; ParentNode,
|
||||||
|
Node: PVirtualNode; var InitialStates: TVirtualNodeInitStates);
|
||||||
|
var
|
||||||
|
vt: TVirtualStringTree;
|
||||||
|
begin
|
||||||
|
// Display multiline grid rows
|
||||||
|
vt := Sender as TVirtualStringTree;
|
||||||
|
if prefGridRowsLineCount = DEFAULT_GRIDROWSLINECOUNT then begin
|
||||||
|
Node.NodeHeight := vt.DefaultNodeHeight;
|
||||||
|
Exclude(Node.States, vsMultiLine);
|
||||||
|
end else begin
|
||||||
|
Node.NodeHeight := prefGridRowsLineCount * (Integer(vt.DefaultNodeHeight) - 2*vt.TextMargin) + 2*vt.TextMargin;
|
||||||
|
Include(Node.States, vsMultiLine);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{***
|
{***
|
||||||
Occurs when active tab has changed.
|
Occurs when active tab has changed.
|
||||||
}
|
}
|
||||||
@ -6640,7 +6661,7 @@ end;
|
|||||||
{**
|
{**
|
||||||
A grid cell fetches its text content
|
A grid cell fetches its text content
|
||||||
}
|
}
|
||||||
procedure TMainForm.GridGetText(Sender: TBaseVirtualTree; Node:
|
procedure TMainForm.AnyGridGetText(Sender: TBaseVirtualTree; Node:
|
||||||
PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: String);
|
PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: String);
|
||||||
var
|
var
|
||||||
c: PGridCell;
|
c: PGridCell;
|
||||||
@ -6686,7 +6707,7 @@ end;
|
|||||||
Cell in data- or query grid gets painted. Colorize font. This procedure is
|
Cell in data- or query grid gets painted. Colorize font. This procedure is
|
||||||
called extremely often for repainting the grid cells. Keep it highly optimized.
|
called extremely often for repainting the grid cells. Keep it highly optimized.
|
||||||
}
|
}
|
||||||
procedure TMainForm.GridPaintText(Sender: TBaseVirtualTree; const
|
procedure TMainForm.AnyGridPaintText(Sender: TBaseVirtualTree; const
|
||||||
TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex; TextType:
|
TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex; TextType:
|
||||||
TVSTTextType);
|
TVSTTextType);
|
||||||
var
|
var
|
||||||
@ -7256,7 +7277,7 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
procedure TMainForm.GridKeyDown(Sender: TObject; var Key: Word; Shift:
|
procedure TMainForm.AnyGridKeyDown(Sender: TObject; var Key: Word; Shift:
|
||||||
TShiftState);
|
TShiftState);
|
||||||
var
|
var
|
||||||
g: TVirtualStringTree;
|
g: TVirtualStringTree;
|
||||||
@ -7370,7 +7391,7 @@ end;
|
|||||||
procedure TMainForm.AutoCalcColWidth(Tree: TVirtualStringTree; Column: TColumnIndex);
|
procedure TMainForm.AutoCalcColWidth(Tree: TVirtualStringTree; Column: TColumnIndex);
|
||||||
var
|
var
|
||||||
Node: PVirtualNode;
|
Node: PVirtualNode;
|
||||||
i, ColTextWidth: Integer;
|
i, ColTextWidth, ContentTextWidth: Integer;
|
||||||
Rect: TRect;
|
Rect: TRect;
|
||||||
Col: TVirtualTreeColumn;
|
Col: TVirtualTreeColumn;
|
||||||
begin
|
begin
|
||||||
@ -7402,7 +7423,10 @@ begin
|
|||||||
// Note: this causes the node to load, an exception can propagate
|
// Note: this causes the node to load, an exception can propagate
|
||||||
// here if the query or connection dies.
|
// here if the query or connection dies.
|
||||||
Rect := Tree.GetDisplayRect(Node, Column, True, True);
|
Rect := Tree.GetDisplayRect(Node, Column, True, True);
|
||||||
ColTextWidth := Max(ColTextWidth, Rect.Right - Rect.Left);
|
ContentTextWidth := Rect.Right - Rect.Left;
|
||||||
|
if vsMultiLine in Node.States then
|
||||||
|
ContentTextWidth := Max(ContentTextWidth, Tree.Canvas.TextWidth(Tree.Text[Node, Column]));
|
||||||
|
ColTextWidth := Max(ColTextWidth, ContentTextWidth);
|
||||||
inc(i);
|
inc(i);
|
||||||
if i > 100 then break;
|
if i > 100 then break;
|
||||||
// GetDisplayRect may have implicitely taken the node away.
|
// GetDisplayRect may have implicitely taken the node away.
|
||||||
@ -7417,7 +7441,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TMainForm.GridBeforeCellPaint(Sender: TBaseVirtualTree;
|
procedure TMainForm.AnyGridBeforeCellPaint(Sender: TBaseVirtualTree;
|
||||||
TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
|
TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
|
||||||
CellPaintMode: TVTCellPaintMode; CellRect: TRect; var ContentRect: TRect);
|
CellPaintMode: TVTCellPaintMode; CellRect: TRect; var ContentRect: TRect);
|
||||||
var
|
var
|
||||||
@ -8304,6 +8328,7 @@ begin
|
|||||||
QueryTab.Grid.OnBeforeCellPaint := QueryGrid.OnBeforeCellPaint;
|
QueryTab.Grid.OnBeforeCellPaint := QueryGrid.OnBeforeCellPaint;
|
||||||
QueryTab.Grid.OnFocusChanged := QueryGrid.OnFocusChanged;
|
QueryTab.Grid.OnFocusChanged := QueryGrid.OnFocusChanged;
|
||||||
QueryTab.Grid.OnGetText := QueryGrid.OnGetText;
|
QueryTab.Grid.OnGetText := QueryGrid.OnGetText;
|
||||||
|
QueryTab.Grid.OnInitNode := QueryGrid.OnInitNode;
|
||||||
QueryTab.Grid.OnKeyDown := QueryGrid.OnKeyDown;
|
QueryTab.Grid.OnKeyDown := QueryGrid.OnKeyDown;
|
||||||
QueryTab.Grid.OnPaintText := QueryGrid.OnPaintText;
|
QueryTab.Grid.OnPaintText := QueryGrid.OnPaintText;
|
||||||
FixVT(QueryTab.Grid);
|
FixVT(QueryTab.Grid);
|
||||||
|
@ -3,7 +3,7 @@ object optionsform: Toptionsform
|
|||||||
Top = 163
|
Top = 163
|
||||||
BorderStyle = bsDialog
|
BorderStyle = bsDialog
|
||||||
Caption = 'Preferences'
|
Caption = 'Preferences'
|
||||||
ClientHeight = 369
|
ClientHeight = 395
|
||||||
ClientWidth = 472
|
ClientWidth = 472
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
@ -17,14 +17,14 @@ object optionsform: Toptionsform
|
|||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
472
|
472
|
||||||
369)
|
395)
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
object pagecontrolMain: TPageControl
|
object pagecontrolMain: TPageControl
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 458
|
Width = 458
|
||||||
Height = 326
|
Height = 352
|
||||||
ActivePage = tabMisc
|
ActivePage = tabMisc
|
||||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
@ -410,7 +410,7 @@ object optionsform: Toptionsform
|
|||||||
Left = 0
|
Left = 0
|
||||||
Top = 132
|
Top = 132
|
||||||
Width = 438
|
Width = 438
|
||||||
Height = 153
|
Height = 179
|
||||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
Caption = 'Sample'
|
Caption = 'Sample'
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
@ -419,7 +419,7 @@ object optionsform: Toptionsform
|
|||||||
Left = 5
|
Left = 5
|
||||||
Top = 18
|
Top = 18
|
||||||
Width = 428
|
Width = 428
|
||||||
Height = 130
|
Height = 156
|
||||||
Cursor = crHandPoint
|
Cursor = crHandPoint
|
||||||
SingleLineMode = False
|
SingleLineMode = False
|
||||||
Align = alClient
|
Align = alClient
|
||||||
@ -489,7 +489,7 @@ object optionsform: Toptionsform
|
|||||||
end
|
end
|
||||||
object lblDataFontHint: TLabel
|
object lblDataFontHint: TLabel
|
||||||
Left = 362
|
Left = 362
|
||||||
Top = 59
|
Top = 84
|
||||||
Width = 29
|
Width = 29
|
||||||
Height = 13
|
Height = 13
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
@ -497,7 +497,7 @@ object optionsform: Toptionsform
|
|||||||
end
|
end
|
||||||
object lblDataFont: TLabel
|
object lblDataFont: TLabel
|
||||||
Left = 4
|
Left = 4
|
||||||
Top = 59
|
Top = 84
|
||||||
Width = 26
|
Width = 26
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = '&Font:'
|
Caption = '&Font:'
|
||||||
@ -510,6 +510,13 @@ object optionsform: Toptionsform
|
|||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Number of rows displayed in data tab (Step, Maximum):'
|
Caption = 'Number of rows displayed in data tab (Step, Maximum):'
|
||||||
end
|
end
|
||||||
|
object lblGridRowsLinecount: TLabel
|
||||||
|
Left = 4
|
||||||
|
Top = 58
|
||||||
|
Width = 122
|
||||||
|
Height = 13
|
||||||
|
Caption = 'Lines of text in grid rows:'
|
||||||
|
end
|
||||||
object editMaxColWidth: TEdit
|
object editMaxColWidth: TEdit
|
||||||
Left = 299
|
Left = 299
|
||||||
Top = 5
|
Top = 5
|
||||||
@ -534,8 +541,8 @@ object optionsform: Toptionsform
|
|||||||
OnChanging = anyUpDownLimitChanging
|
OnChanging = anyUpDownLimitChanging
|
||||||
end
|
end
|
||||||
object comboDataFontName: TComboBox
|
object comboDataFontName: TComboBox
|
||||||
Left = 60
|
Left = 59
|
||||||
Top = 55
|
Top = 80
|
||||||
Width = 234
|
Width = 234
|
||||||
Height = 21
|
Height = 21
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
@ -545,7 +552,7 @@ object optionsform: Toptionsform
|
|||||||
end
|
end
|
||||||
object editDataFontSize: TEdit
|
object editDataFontSize: TEdit
|
||||||
Left = 299
|
Left = 299
|
||||||
Top = 55
|
Top = 80
|
||||||
Width = 42
|
Width = 42
|
||||||
Height = 21
|
Height = 21
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
@ -555,7 +562,7 @@ object optionsform: Toptionsform
|
|||||||
end
|
end
|
||||||
object updownDataFontSize: TUpDown
|
object updownDataFontSize: TUpDown
|
||||||
Left = 341
|
Left = 341
|
||||||
Top = 55
|
Top = 80
|
||||||
Width = 16
|
Width = 16
|
||||||
Height = 21
|
Height = 21
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
@ -565,9 +572,9 @@ object optionsform: Toptionsform
|
|||||||
end
|
end
|
||||||
object grpFieldLayout: TGroupBox
|
object grpFieldLayout: TGroupBox
|
||||||
Left = 4
|
Left = 4
|
||||||
Top = 81
|
Top = 112
|
||||||
Width = 433
|
Width = 433
|
||||||
Height = 200
|
Height = 195
|
||||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
Caption = 'Field colors and editors'
|
Caption = 'Field colors and editors'
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
@ -754,6 +761,28 @@ object optionsform: Toptionsform
|
|||||||
NumbersOnly = True
|
NumbersOnly = True
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
end
|
end
|
||||||
|
object editGridRowsLineCount: TEdit
|
||||||
|
Left = 299
|
||||||
|
Top = 55
|
||||||
|
Width = 42
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
TabOrder = 8
|
||||||
|
Text = '1'
|
||||||
|
OnChange = Modified
|
||||||
|
end
|
||||||
|
object updownGridRowsLineCount: TUpDown
|
||||||
|
Left = 341
|
||||||
|
Top = 55
|
||||||
|
Width = 16
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Associate = editGridRowsLineCount
|
||||||
|
Min = 1
|
||||||
|
Position = 1
|
||||||
|
TabOrder = 9
|
||||||
|
OnChanging = anyUpDownLimitChanging
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object tabCSV: TTabSheet
|
object tabCSV: TTabSheet
|
||||||
BorderWidth = 5
|
BorderWidth = 5
|
||||||
@ -894,7 +923,7 @@ object optionsform: Toptionsform
|
|||||||
ImageIndex = 4
|
ImageIndex = 4
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
450
|
450
|
||||||
298)
|
324)
|
||||||
object lblShortcut1: TLabel
|
object lblShortcut1: TLabel
|
||||||
Left = 199
|
Left = 199
|
||||||
Top = 62
|
Top = 62
|
||||||
@ -907,7 +936,7 @@ object optionsform: Toptionsform
|
|||||||
Left = 199
|
Left = 199
|
||||||
Top = 3
|
Top = 3
|
||||||
Width = 211
|
Width = 211
|
||||||
Height = 46
|
Height = 72
|
||||||
Anchors = [akLeft, akTop, akBottom]
|
Anchors = [akLeft, akTop, akBottom]
|
||||||
AutoSize = False
|
AutoSize = False
|
||||||
Caption = 'Please select a shortcut item in the tree.'
|
Caption = 'Please select a shortcut item in the tree.'
|
||||||
@ -970,7 +999,7 @@ object optionsform: Toptionsform
|
|||||||
end
|
end
|
||||||
object btnCancel: TButton
|
object btnCancel: TButton
|
||||||
Left = 311
|
Left = 311
|
||||||
Top = 338
|
Top = 364
|
||||||
Width = 75
|
Width = 75
|
||||||
Height = 25
|
Height = 25
|
||||||
Anchors = [akRight, akBottom]
|
Anchors = [akRight, akBottom]
|
||||||
@ -981,7 +1010,7 @@ object optionsform: Toptionsform
|
|||||||
end
|
end
|
||||||
object btnOK: TButton
|
object btnOK: TButton
|
||||||
Left = 231
|
Left = 231
|
||||||
Top = 338
|
Top = 364
|
||||||
Width = 75
|
Width = 75
|
||||||
Height = 25
|
Height = 25
|
||||||
Anchors = [akRight, akBottom]
|
Anchors = [akRight, akBottom]
|
||||||
@ -993,7 +1022,7 @@ object optionsform: Toptionsform
|
|||||||
end
|
end
|
||||||
object btnApply: TButton
|
object btnApply: TButton
|
||||||
Left = 391
|
Left = 391
|
||||||
Top = 338
|
Top = 364
|
||||||
Width = 75
|
Width = 75
|
||||||
Height = 25
|
Height = 25
|
||||||
Anchors = [akRight, akBottom]
|
Anchors = [akRight, akBottom]
|
||||||
@ -1004,7 +1033,7 @@ object optionsform: Toptionsform
|
|||||||
end
|
end
|
||||||
object btnRestoreDefaults: TButton
|
object btnRestoreDefaults: TButton
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 338
|
Top = 364
|
||||||
Width = 97
|
Width = 97
|
||||||
Height = 25
|
Height = 25
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
@ -1014,7 +1043,7 @@ object optionsform: Toptionsform
|
|||||||
end
|
end
|
||||||
object SynSQLSynSQLSample: TSynSQLSyn
|
object SynSQLSynSQLSample: TSynSQLSyn
|
||||||
SQLDialect = sqlMySQL
|
SQLDialect = sqlMySQL
|
||||||
Left = 144
|
Left = 112
|
||||||
Top = 336
|
Top = 360
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -129,6 +129,9 @@ type
|
|||||||
chkLogEventInfo: TCheckBox;
|
chkLogEventInfo: TCheckBox;
|
||||||
chkLogEventDebug: TCheckBox;
|
chkLogEventDebug: TCheckBox;
|
||||||
editGridRowCountStep: TEdit;
|
editGridRowCountStep: TEdit;
|
||||||
|
lblGridRowsLinecount: TLabel;
|
||||||
|
editGridRowsLineCount: TEdit;
|
||||||
|
updownGridRowsLineCount: TUpDown;
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure Modified(Sender: TObject);
|
procedure Modified(Sender: TObject);
|
||||||
procedure Apply(Sender: TObject);
|
procedure Apply(Sender: TObject);
|
||||||
@ -246,6 +249,7 @@ begin
|
|||||||
Mainform.prefGridRowcountMax := StrToIntDef(editGridRowCountMax.Text, DEFAULT_MAXTOTALROWS);
|
Mainform.prefGridRowcountMax := StrToIntDef(editGridRowCountMax.Text, DEFAULT_MAXTOTALROWS);
|
||||||
MainReg.WriteInteger(REGNAME_ROWSPERSTEP, Mainform.prefGridRowcountStep);
|
MainReg.WriteInteger(REGNAME_ROWSPERSTEP, Mainform.prefGridRowcountStep);
|
||||||
MainReg.WriteInteger(REGNAME_MAXTOTALROWS, Mainform.prefGridRowcountMax);
|
MainReg.WriteInteger(REGNAME_MAXTOTALROWS, Mainform.prefGridRowcountMax);
|
||||||
|
MainReg.WriteInteger(REGNAME_GRIDROWSLINECOUNT, updownGridRowsLineCount.Position);
|
||||||
MainReg.WriteString(REGNAME_DATAFONTNAME, comboDataFontName.Text);
|
MainReg.WriteString(REGNAME_DATAFONTNAME, comboDataFontName.Text);
|
||||||
MainReg.WriteInteger(REGNAME_DATAFONTSIZE, updownDataFontSize.Position);
|
MainReg.WriteInteger(REGNAME_DATAFONTSIZE, updownDataFontSize.Position);
|
||||||
MainReg.WriteBool(REGNAME_LOGTOFILE, chkLogToFile.Checked);
|
MainReg.WriteBool(REGNAME_LOGTOFILE, chkLogToFile.Checked);
|
||||||
@ -296,12 +300,15 @@ begin
|
|||||||
// Set relevant properties in mainform
|
// Set relevant properties in mainform
|
||||||
Mainform.DataGrid.Font.Name := comboDataFontName.Text;
|
Mainform.DataGrid.Font.Name := comboDataFontName.Text;
|
||||||
Mainform.DataGrid.Font.Size := updownDataFontSize.Position;
|
Mainform.DataGrid.Font.Size := updownDataFontSize.Position;
|
||||||
|
Mainform.prefGridRowsLineCount := updownGridRowsLineCount.Position;
|
||||||
FixVT(Mainform.DataGrid);
|
FixVT(Mainform.DataGrid);
|
||||||
|
Mainform.DataGrid.ReinitChildren(nil, False);
|
||||||
for i:=Mainform.tabQuery.PageIndex to Mainform.PageControlMain.PageCount-1 do begin
|
for i:=Mainform.tabQuery.PageIndex to Mainform.PageControlMain.PageCount-1 do begin
|
||||||
Grid := TQueryTab(Mainform.QueryTabs[i-Mainform.tabQuery.PageIndex]).Grid;
|
Grid := TQueryTab(Mainform.QueryTabs[i-Mainform.tabQuery.PageIndex]).Grid;
|
||||||
Grid.Font.Name := comboDataFontName.Text;
|
Grid.Font.Name := comboDataFontName.Text;
|
||||||
Grid.Font.Size := updownDataFontSize.Position;
|
Grid.Font.Size := updownDataFontSize.Position;
|
||||||
FixVT(Grid);
|
FixVT(Grid);
|
||||||
|
Grid.ReinitChildren(nil, False);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Mainform.prefLogsqlnum := updownLogLines.Position;
|
Mainform.prefLogsqlnum := updownLogLines.Position;
|
||||||
@ -415,6 +422,7 @@ begin
|
|||||||
updownMaxColWidth.Position := GetRegValue(REGNAME_MAXCOLWIDTH, DEFAULT_MAXCOLWIDTH);
|
updownMaxColWidth.Position := GetRegValue(REGNAME_MAXCOLWIDTH, DEFAULT_MAXCOLWIDTH);
|
||||||
editGridRowCountStep.Text := IntToStr(GetRegValue(REGNAME_ROWSPERSTEP, DEFAULT_ROWSPERSTEP));
|
editGridRowCountStep.Text := IntToStr(GetRegValue(REGNAME_ROWSPERSTEP, DEFAULT_ROWSPERSTEP));
|
||||||
editGridRowCountMax.Text := IntToStr(GetRegValue(REGNAME_MAXTOTALROWS, DEFAULT_MAXTOTALROWS));
|
editGridRowCountMax.Text := IntToStr(GetRegValue(REGNAME_MAXTOTALROWS, DEFAULT_MAXTOTALROWS));
|
||||||
|
updownGridRowsLineCount.Position := GetRegValue(REGNAME_GRIDROWSLINECOUNT, DEFAULT_GRIDROWSLINECOUNT);
|
||||||
|
|
||||||
// Export-Options:
|
// Export-Options:
|
||||||
editCSVSeparator.Text := GetRegValue(REGNAME_CSV_SEPARATOR, DEFAULT_CSV_SEPARATOR);
|
editCSVSeparator.Text := GetRegValue(REGNAME_CSV_SEPARATOR, DEFAULT_CSV_SEPARATOR);
|
||||||
|
Reference in New Issue
Block a user