Skip to content

Commit 613f4d8

Browse files
committed
feat: add checkbox "Open file after creation" to grid export dialog
Refs #912
1 parent eb1b5ea commit 613f4d8

File tree

3 files changed

+1283
-1264
lines changed

3 files changed

+1283
-1264
lines changed

source/apphelpers.pas

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ TWinControlHelper = class helper for TWinControl
189189
asExportSQLDatabase, asExportSQLServerDatabase, asExportSQLOutput, asExportSQLAddComments, asExportSQLRemoveAutoIncrement, asExportSQLRemoveDefiner,
190190
asGridExportWindowWidth, asGridExportWindowHeight, asGridExportOutputCopy, asGridExportOutputFile,
191191
asGridExportFilename, asGridExportRecentFiles, asGridExportEncoding, asGridExportFormat, asGridExportSelection,
192-
asGridExportColumnNames, asGridExportIncludeAutoInc, asGridExportIncludeQuery, asGridExportRemoveLinebreaks,
192+
asGridExportColumnNames, asGridExportIncludeAutoInc, asGridExportIncludeQuery, asGridExportRemoveLinebreaks, asGridExportOpenFile,
193193
asGridExportSeparator, asGridExportEncloser, asGridExportTerminator, asGridExportNull,
194194

195195
asGridExportClpColumnNames, asGridExportClpIncludeAutoInc, asGridExportClpRemoveLinebreaks,
@@ -3802,6 +3802,7 @@ constructor TAppSettings.Create;
38023802
InitSetting(asGridExportIncludeAutoInc, 'GridExportAutoInc', 0, True);
38033803
InitSetting(asGridExportIncludeQuery, 'GridExportIncludeQuery', 0, False);
38043804
InitSetting(asGridExportRemoveLinebreaks, 'GridExportRemoveLinebreaks', 0, False);
3805+
InitSetting(asGridExportOpenFile, 'GridExportOpenFile', 0, False);
38053806
InitSetting(asGridExportSeparator, 'GridExportSeparator', 0, False, ';');
38063807
InitSetting(asGridExportEncloser, 'GridExportEncloser', 0, False, '');
38073808
InitSetting(asGridExportTerminator, 'GridExportTerminator', 0, False, '\r\n');

source/exportgrid.lfm

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ object frmExportGrid: TfrmExportGrid
245245
OnButtonClick = editCSVRightButtonClick
246246
OnChange = editCSVChange
247247
PasswordChar = #0
248-
TabOrder = 4
248+
TabOrder = 5
249249
Text = ';'
250250
end
251251
object editEncloser: TEditButton
@@ -262,10 +262,10 @@ object frmExportGrid: TfrmExportGrid
262262
ImageIndex = 108
263263
MaxLength = 0
264264
NumGlyphs = 1
265+
PasswordChar = #0
266+
TabOrder = 6
265267
OnButtonClick = editCSVRightButtonClick
266268
OnChange = editCSVChange
267-
PasswordChar = #0
268-
TabOrder = 5
269269
end
270270
object editTerminator: TEditButton
271271
AnchorSideTop.Control = editEncloser
@@ -284,7 +284,7 @@ object frmExportGrid: TfrmExportGrid
284284
OnButtonClick = editCSVRightButtonClick
285285
OnChange = editCSVChange
286286
PasswordChar = #0
287-
TabOrder = 6
287+
TabOrder = 7
288288
Text = '\r\n'
289289
end
290290
object chkIncludeAutoIncrement: TCheckBox
@@ -323,10 +323,10 @@ object frmExportGrid: TfrmExportGrid
323323
ImageIndex = 108
324324
MaxLength = 0
325325
NumGlyphs = 1
326+
PasswordChar = #0
327+
TabOrder = 8
326328
OnButtonClick = editCSVRightButtonClick
327329
OnChange = editCSVChange
328-
PasswordChar = #0
329-
TabOrder = 7
330330
end
331331
object chkRemoveLinebreaks: TCheckBox
332332
AnchorSideTop.Control = chkIncludeQuery
@@ -339,6 +339,17 @@ object frmExportGrid: TfrmExportGrid
339339
Caption = 'Remove linebreaks from contents'
340340
TabOrder = 3
341341
end
342+
object chkOpenFile: TCheckBox
343+
AnchorSideTop.Control = chkRemoveLinebreaks
344+
AnchorSideTop.Side = asrBottom
345+
Left = 10
346+
Height = 24
347+
Top = 126
348+
Width = 175
349+
BorderSpacing.Around = 6
350+
Caption = 'Open file after creation'
351+
TabOrder = 4
352+
end
342353
end
343354
object btnSetClipboardDefaults: TSpeedButton
344355
AnchorSideBottom.Control = Owner

0 commit comments

Comments
 (0)