RxFPC: RxDBGrid - fix export to pdf

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5833 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2017-04-12 11:29:56 +00:00
parent e9ca7a1e2d
commit f39df9a19f
8 changed files with 1193 additions and 1036 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<Version Value="10"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
@ -10,9 +10,6 @@
<UseXPManifest Value="True"/>
<Icon Value="0"/>
</General>
<VersionInfo>
<StringTable ProductVersion=""/>
</VersionInfo>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>

File diff suppressed because it is too large Load Diff

View File

@ -8,25 +8,25 @@ object Form1: TForm1
ClientWidth = 1043
OnClose = FormClose
OnCreate = FormCreate
LCLVersion = '1.7'
LCLVersion = '1.9.0.0'
object Panel1: TPanel
Left = 0
Height = 50
Top = 347
Height = 37
Top = 360
Width = 1043
Align = alBottom
AutoSize = True
ClientHeight = 50
ClientHeight = 37
ClientWidth = 1043
TabOrder = 0
object Button1: TButton
AnchorSideLeft.Control = Panel1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Panel1
Left = 476
Height = 36
Left = 481
Height = 23
Top = 7
Width = 90
Width = 81
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Create PDF'
@ -36,7 +36,7 @@ object Form1: TForm1
end
object PageControl1: TPageControl
Left = 0
Height = 347
Height = 360
Top = 0
Width = 1043
ActivePage = TabSheet1
@ -45,13 +45,13 @@ object Form1: TForm1
TabOrder = 1
object TabSheet1: TTabSheet
Caption = 'Test data'
ClientHeight = 313
ClientWidth = 1033
ClientHeight = 334
ClientWidth = 1035
object RxDBGrid1: TRxDBGrid
Left = 0
Height = 313
Height = 334
Top = 0
Width = 1033
Width = 1035
ColumnDefValues.BlobText = '(данные)'
TitleButtons = True
AutoSort = True
@ -63,8 +63,11 @@ object Form1: TForm1
Width = 50
FieldName = 'ID'
EditButtons = <>
Filter.IsNull = False
Filter.IsAll = True
Filter.DropDownRows = 0
Filter.EmptyValue = '(Нет)'
Filter.AllValue = '(All values)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footers = <>
@ -77,8 +80,11 @@ object Form1: TForm1
Width = 120
FieldName = 'PDATE'
EditButtons = <>
Filter.IsNull = False
Filter.IsAll = True
Filter.DropDownRows = 0
Filter.EmptyValue = '(Нет)'
Filter.AllValue = '(All values)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footers = <>
@ -92,8 +98,11 @@ object Form1: TForm1
Width = 364
FieldName = 'NAME'
EditButtons = <>
Filter.IsNull = False
Filter.IsAll = True
Filter.DropDownRows = 0
Filter.EmptyValue = '(Нет)'
Filter.AllValue = '(All values)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footer.Alignment = taRightJustify
@ -124,8 +133,11 @@ object Form1: TForm1
Width = 100
FieldName = 'SUM'
EditButtons = <>
Filter.IsNull = False
Filter.IsAll = True
Filter.DropDownRows = 0
Filter.EmptyValue = '(Нет)'
Filter.AllValue = '(All values)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footer.Alignment = taRightJustify
@ -160,8 +172,11 @@ object Form1: TForm1
Width = 60
FieldName = 'FLAG'
EditButtons = <>
Filter.IsNull = False
Filter.IsAll = True
Filter.DropDownRows = 0
Filter.EmptyValue = '(Нет)'
Filter.AllValue = '(All values)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footers = <>
@ -181,8 +196,11 @@ object Form1: TForm1
Width = 200
FieldName = 'Country'
EditButtons = <>
Filter.IsNull = False
Filter.IsAll = True
Filter.DropDownRows = 0
Filter.EmptyValue = '(Нет)'
Filter.AllValue = '(All values)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footers = <>
@ -194,8 +212,11 @@ object Form1: TForm1
Width = 200
FieldName = 'Sity'
EditButtons = <>
Filter.IsNull = False
Filter.IsAll = True
Filter.DropDownRows = 0
Filter.EmptyValue = '(Нет)'
Filter.AllValue = '(All values)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footers = <>
@ -260,6 +281,8 @@ object Form1: TForm1
FooterOptions.Color = clYellow
FooterOptions.RowCount = 3
FooterOptions.DrawFullLine = True
SearchOptions.QuickSearchOptions = [loCaseInsensitive, loPartialKey]
SearchOptions.FromStart = False
OptionsRx = [rdgAllowColumnsForm, rdgAllowDialogFind, rdgFooterRows, rdgAllowQuickFilter, rdgAllowToolMenu, rdgWordWrap]
FooterColor = clYellow
FooterRowCount = 3
@ -334,8 +357,8 @@ object Form1: TForm1
DataType = ftInteger
end>
PacketRecords = 0
left = 136
top = 88
Left = 136
Top = 88
object RxMemoryData1ID: TAutoIncField
FieldKind = fkData
FieldName = 'ID'
@ -409,8 +432,8 @@ object Form1: TForm1
end
object DataSource1: TDataSource
DataSet = RxMemoryData1
left = 104
top = 88
Left = 104
Top = 88
end
object RxDBGridExportPDF1: TRxDBGridExportPDF
RxDBGrid = RxDBGrid1
@ -426,12 +449,12 @@ object Form1: TForm1
PageMargin.Top = 40
PageMargin.Right = 40
PageMargin.Bottom = 40
left = 112
top = 160
Left = 112
Top = 160
end
object ImageList1: TImageList
left = 112
top = 224
Left = 112
Top = 224
Bitmap = {
4C6903000000100000001000000000000000000000FF000000FF000000000000
0000000000FF000000FF0000000000000000000000FF000000FF000000000000

View File

@ -122,7 +122,7 @@ var
i: Integer;
begin
Memo1.Lines.Clear;
gTTFontCache.BuildFontFacheIgnoresErrors:=true;
gTTFontCache.BuildFontCacheIgnoresErrors:=true;
gTTFontCache.SearchPath.Assign(FontDirList);
gTTFontCache.BuildFontCache;

View File

@ -409,7 +409,7 @@ var
begin
fX := ConvetUnits(X);
fY := ConvetUnits(Y);
fY := ConvetUnits(Y+2);
fW := ConvetUnits(W);
fH := ConvetUnits(H);
@ -424,26 +424,27 @@ begin
case ATextAlign of
taLeftJustify:
begin
Y1:=fY - FTH2;
// Y1:=fY - FTH2;
X1:=fX + ConvetUnits(constCellPadding);
end;
taRightJustify:
begin
Y1:=fY - FTH2;
// Y1:=fY - FTH2;
X1:=fX + fW - FTW - ConvetUnits(constCellPadding);
if X1 < fX then
X1:=fX;
end;
taCenter:
begin
Y1:=fY - FTH2;
// Y1:=fY - FTH2;
X1:=fX + fW / 2 - FTW / 2 - ConvetUnits(constCellPadding);
if X1 < fX then
X1:=fX;
end;
end;
FCurPage.WriteText(X1, Y1 + fH, AText);
Y1:=fY + FTH2;
FCurPage.WriteText(X1, Y1 {- fH}, AText);
end;
procedure TRxDBGridExportPDF.DrawRect(X, Y, W, H: integer; ABorderColor,
@ -509,7 +510,7 @@ begin
end;
Y1:=Y1 + fW1;
FCurPage.DrawImage(X1, Y1, fW1, fH1, IDX); // left-bottom coordinate of image
FCurPage.DrawImage(X1, Y1, fW1, fH1, IDX);
finally
S.Free;
@ -791,7 +792,7 @@ begin
FPDFDocument.Infos.ApplicationName := ApplicationName;
FPDFDocument.Infos.CreationDate := Now;
FPDFDocument.Options:=FPdfOptions.FOptions;
FPDFDocument.Options:=FPdfOptions.FOptions + [poPageOriginAtTop];
FPDFDocument.DefaultOrientation:=FPdfOptions.PaperOrientation;
//calc need count pages for all columns
@ -853,9 +854,9 @@ begin
FFontItems:=TExportFonts.Create(Self);
FWorkPages:=TFPList.Create;
try
FPDFDocument.StartDocument;
DoSetupFonts;
DoSetupDocHeader;
FPDFDocument.StartDocument;
FCurSection := FPDFDocument.Sections.AddSection; // we always need at least one section
FDataSet.First;
repeat
@ -869,9 +870,6 @@ begin
DoExportFooter;
end;
//DoTest; //!!!!
DoSaveDocument;
Result:=true;
finally
@ -895,6 +893,7 @@ end;
function TRxDBGridExportPDF.DoSetupTools: boolean;
begin
RxDBGridExportPdfSetupForm:=TRxDBGridExportPdfSetupForm.Create(Application);
RxDBGridExportPdfSetupForm.FileNameEdit1.FileName:=FileName;
RxDBGridExportPdfSetupForm.cbOpenAfterExport.Checked:=FOpenAfterExport;
RxDBGridExportPdfSetupForm.cbExportColumnHeader.Checked:=repExportTitle in FOptions;

View File

@ -1,21 +1,21 @@
object RxDBGridExportPdfSetupForm: TRxDBGridExportPdfSetupForm
Left = 544
Height = 345
Top = 387
Height = 416
Top = 316
Width = 522
Caption = 'Export params'
ClientHeight = 345
ClientHeight = 416
ClientWidth = 522
OnCreate = FormCreate
Position = poScreenCenter
LCLVersion = '1.7'
LCLVersion = '1.9.0.0'
object Label1: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
Left = 6
Height = 20
Height = 13
Top = 6
Width = 105
Width = 78
BorderSpacing.Around = 6
Caption = 'Export file name'
FocusControl = FileNameEdit1
@ -28,8 +28,8 @@ object RxDBGridExportPdfSetupForm: TRxDBGridExportPdfSetupForm
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 12
Height = 37
Top = 32
Height = 21
Top = 25
Width = 504
Filter = 'All files (*.*)|*.*|LibreOffice/OpenOffice (*.ods)|*.ods|Excell 97-2003|*.xls|Excell 2007-2013|*.xlxs'
FilterIndex = 0
@ -44,8 +44,8 @@ object RxDBGridExportPdfSetupForm: TRxDBGridExportPdfSetupForm
end
object ButtonPanel1: TButtonPanel
Left = 6
Height = 46
Top = 293
Height = 34
Top = 376
Width = 510
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
@ -58,266 +58,275 @@ object RxDBGridExportPdfSetupForm: TRxDBGridExportPdfSetupForm
TabOrder = 1
ShowButtons = [pbOK, pbCancel, pbHelp]
end
object PageControl1: TPageControl
object GroupBox1: TGroupBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = FileNameEdit1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = ButtonPanel1
Left = 6
Height = 212
Top = 75
Height = 117
Top = 52
Width = 510
ActivePage = TabSheet2
Anchors = [akTop, akLeft, akRight, akBottom]
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
TabIndex = 1
Caption = 'Global'
ClientHeight = 99
ClientWidth = 506
TabOrder = 2
object TabSheet1: TTabSheet
Caption = 'Global'
ClientHeight = 178
ClientWidth = 500
object cbOpenAfterExport: TCheckBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = TabSheet1
Left = 8
Height = 24
Top = 6
Width = 141
BorderSpacing.Around = 6
Caption = 'Open after export'
TabOrder = 0
end
object cbExportColumnHeader: TCheckBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = cbOpenAfterExport
AnchorSideTop.Side = asrBottom
Left = 6
Height = 24
Top = 36
Width = 167
BorderSpacing.Around = 6
Caption = 'Export column header'
TabOrder = 1
end
object cbExportColumnFooter: TCheckBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = cbExportColumnHeader
AnchorSideTop.Side = asrBottom
Left = 6
Height = 24
Top = 66
Width = 162
BorderSpacing.Around = 6
Caption = 'Export column footer'
TabOrder = 2
end
object cbExportCellColors: TCheckBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = cbExportColumnFooter
AnchorSideTop.Side = asrBottom
Left = 6
Height = 24
Top = 96
Width = 138
BorderSpacing.Around = 6
Caption = 'Export cell colors'
TabOrder = 3
end
object cbOverwriteExisting: TCheckBox
AnchorSideLeft.Control = Label4
AnchorSideTop.Control = TabSheet1
Left = 256
Height = 24
Top = 6
Width = 168
BorderSpacing.Around = 6
Caption = 'Overwrite existing file'
Enabled = False
TabOrder = 4
end
object Label4: TLabel
AnchorSideLeft.Control = TabSheet1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = TabSheet1
Left = 250
Height = 1
Top = 0
Width = 1
ParentColor = False
end
object CheckBox6: TCheckBox
AnchorSideLeft.Control = Label4
AnchorSideTop.Control = cbOverwriteExisting
AnchorSideTop.Side = asrBottom
Left = 256
Height = 24
Top = 36
Width = 117
BorderSpacing.Around = 6
Caption = 'Export images'
TabOrder = 5
end
object Label5: TLabel
AnchorSideLeft.Control = Label4
AnchorSideTop.Control = CheckBox6
AnchorSideTop.Side = asrBottom
Left = 256
Height = 20
Top = 66
Width = 64
BorderSpacing.Around = 6
Caption = 'Title color'
ParentColor = False
end
object ColorBox1: TColorBox
AnchorSideLeft.Control = Label5
AnchorSideTop.Control = Label5
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = TabSheet1
AnchorSideRight.Side = asrBottom
Left = 262
Height = 36
Top = 92
Width = 232
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbIncludeDefault, cbCustomColor, cbPrettyNames, cbCustomColors]
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
ItemHeight = 0
TabOrder = 6
end
object ColorBox1: TColorBox
AnchorSideLeft.Control = Label5
AnchorSideTop.Control = Label5
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = GroupBox1
AnchorSideRight.Side = asrBottom
Left = 265
Height = 22
Top = 71
Width = 235
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbIncludeDefault, cbCustomColor, cbPrettyNames, cbCustomColors]
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
ItemHeight = 16
TabOrder = 0
end
object TabSheet2: TTabSheet
Caption = 'PDF Options'
ClientHeight = 178
ClientWidth = 500
object Label2: TLabel
AnchorSideLeft.Control = Label3
AnchorSideTop.Control = TabSheet2
Left = 256
Height = 20
Top = 6
Width = 70
BorderSpacing.Around = 6
Caption = 'Paper type'
ParentColor = False
end
object ComboBox1: TComboBox
AnchorSideLeft.Control = Label2
AnchorSideTop.Control = Label2
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = TabSheet2
AnchorSideRight.Side = asrBottom
Left = 262
Height = 36
Top = 32
Width = 232
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
ItemHeight = 0
Style = csDropDownList
TabOrder = 0
end
object RadioGroup1: TRadioGroup
AnchorSideLeft.Control = Label4
AnchorSideTop.Control = ComboBox1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = TabSheet2
AnchorSideRight.Side = asrBottom
Left = 265
Height = 69
Top = 74
Width = 229
Anchors = [akTop, akLeft, akRight]
AutoFill = True
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Orientation'
ChildSizing.LeftRightSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 48
ClientWidth = 227
Items.Strings = (
'Portrait'
'Landscape'
)
TabOrder = 1
end
object Label3: TLabel
AnchorSideLeft.Control = TabSheet2
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = TabSheet2
Left = 250
Height = 1
Top = 0
Width = 1
ParentColor = False
end
object CheckBox1: TCheckBox
AnchorSideLeft.Control = TabSheet2
AnchorSideTop.Control = TabSheet2
Left = 6
Height = 24
Top = 6
Width = 77
BorderSpacing.Around = 6
Caption = 'Out line'
TabOrder = 2
end
object CheckBox2: TCheckBox
AnchorSideLeft.Control = TabSheet2
AnchorSideTop.Control = CheckBox1
AnchorSideTop.Side = asrBottom
Left = 6
Height = 24
Top = 36
Width = 121
BorderSpacing.Around = 6
Caption = 'Compress text'
TabOrder = 3
end
object CheckBox3: TCheckBox
AnchorSideLeft.Control = TabSheet2
AnchorSideTop.Control = CheckBox2
AnchorSideTop.Side = asrBottom
Left = 6
Height = 24
Top = 66
Width = 128
BorderSpacing.Around = 6
Caption = 'Compress fonts'
TabOrder = 4
end
object CheckBox4: TCheckBox
AnchorSideLeft.Control = TabSheet2
AnchorSideTop.Control = CheckBox3
AnchorSideTop.Side = asrBottom
Left = 6
Height = 24
Top = 96
Width = 140
BorderSpacing.Around = 6
Caption = 'Compress images'
TabOrder = 5
end
object CheckBox5: TCheckBox
AnchorSideLeft.Control = TabSheet2
AnchorSideTop.Control = CheckBox4
AnchorSideTop.Side = asrBottom
Left = 6
Height = 24
Top = 126
Width = 116
BorderSpacing.Around = 6
Caption = 'Use raw JPEG'
TabOrder = 6
end
object Label5: TLabel
AnchorSideLeft.Control = Label3
AnchorSideTop.Control = CheckBox6
AnchorSideTop.Side = asrBottom
Left = 259
Height = 13
Top = 52
Width = 46
BorderSpacing.Around = 6
Caption = 'Title color'
ParentColor = False
end
object CheckBox6: TCheckBox
AnchorSideLeft.Control = Label3
AnchorSideTop.Control = cbOverwriteExisting
AnchorSideTop.Side = asrBottom
Left = 259
Height = 17
Top = 29
Width = 86
BorderSpacing.Around = 6
Caption = 'Export images'
TabOrder = 1
end
object cbOverwriteExisting: TCheckBox
AnchorSideLeft.Control = Label3
AnchorSideTop.Control = GroupBox1
Left = 259
Height = 17
Top = 6
Width = 123
BorderSpacing.Around = 6
Caption = 'Overwrite existing file'
Enabled = False
TabOrder = 2
end
object cbOpenAfterExport: TCheckBox
AnchorSideLeft.Control = GroupBox1
AnchorSideTop.Control = GroupBox1
Left = 6
Height = 17
Top = 6
Width = 106
BorderSpacing.Around = 6
Caption = 'Open after export'
TabOrder = 3
end
object cbExportColumnHeader: TCheckBox
AnchorSideLeft.Control = GroupBox1
AnchorSideTop.Control = cbOpenAfterExport
AnchorSideTop.Side = asrBottom
Left = 6
Height = 17
Top = 29
Width = 123
BorderSpacing.Around = 6
Caption = 'Export column header'
TabOrder = 4
end
object cbExportColumnFooter: TCheckBox
AnchorSideLeft.Control = GroupBox1
AnchorSideTop.Control = cbExportColumnHeader
AnchorSideTop.Side = asrBottom
Left = 6
Height = 17
Top = 52
Width = 119
BorderSpacing.Around = 6
Caption = 'Export column footer'
TabOrder = 5
end
object cbExportCellColors: TCheckBox
AnchorSideLeft.Control = GroupBox1
AnchorSideTop.Control = cbExportColumnFooter
AnchorSideTop.Side = asrBottom
Left = 6
Height = 17
Top = 75
Width = 99
BorderSpacing.Around = 6
Caption = 'Export cell colors'
TabOrder = 6
end
object Label3: TLabel
AnchorSideLeft.Control = GroupBox1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = GroupBox1
Left = 253
Height = 1
Top = 0
Width = 1
ParentColor = False
end
end
object GroupBox2: TGroupBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = GroupBox1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 6
Height = 139
Top = 175
Width = 510
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Around = 6
Caption = 'PDF Options'
ClientHeight = 121
ClientWidth = 506
TabOrder = 3
object CheckBox1: TCheckBox
AnchorSideTop.Control = GroupBox2
Left = 6
Height = 17
Top = 6
Width = 55
BorderSpacing.Around = 6
Caption = 'Out line'
TabOrder = 0
end
object CheckBox2: TCheckBox
AnchorSideLeft.Control = GroupBox2
AnchorSideTop.Control = CheckBox1
AnchorSideTop.Side = asrBottom
Left = 6
Height = 17
Top = 29
Width = 88
BorderSpacing.Around = 6
Caption = 'Compress text'
TabOrder = 1
end
object CheckBox3: TCheckBox
AnchorSideLeft.Control = GroupBox2
AnchorSideTop.Control = CheckBox2
AnchorSideTop.Side = asrBottom
Left = 6
Height = 17
Top = 52
Width = 93
BorderSpacing.Around = 6
Caption = 'Compress fonts'
TabOrder = 2
end
object CheckBox4: TCheckBox
AnchorSideLeft.Control = GroupBox2
AnchorSideTop.Control = CheckBox3
AnchorSideTop.Side = asrBottom
Left = 6
Height = 17
Top = 75
Width = 101
BorderSpacing.Around = 6
Caption = 'Compress images'
TabOrder = 3
end
object CheckBox5: TCheckBox
AnchorSideLeft.Control = GroupBox2
AnchorSideTop.Control = CheckBox4
AnchorSideTop.Side = asrBottom
Left = 6
Height = 17
Top = 98
Width = 84
BorderSpacing.Around = 6
Caption = 'Use raw JPEG'
TabOrder = 4
end
object Label2: TLabel
AnchorSideLeft.Control = Label4
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = GroupBox2
Left = 260
Height = 13
Top = 6
Width = 53
BorderSpacing.Around = 6
Caption = 'Paper type'
ParentColor = False
end
object ComboBox1: TComboBox
AnchorSideLeft.Control = Label2
AnchorSideTop.Control = Label2
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = GroupBox2
AnchorSideRight.Side = asrBottom
Left = 266
Height = 21
Top = 25
Width = 234
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
ItemHeight = 13
Style = csDropDownList
TabOrder = 5
end
object RadioGroup1: TRadioGroup
AnchorSideLeft.Control = Label4
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ComboBox1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = GroupBox2
AnchorSideRight.Side = asrBottom
Left = 260
Height = 52
Top = 52
Width = 240
Anchors = [akTop, akLeft, akRight]
AutoFill = True
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Orientation'
ChildSizing.LeftRightSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 34
ClientWidth = 236
Items.Strings = (
'Portrait'
'Landscape'
)
TabOrder = 6
end
object Label4: TLabel
AnchorSideLeft.Control = GroupBox2
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = GroupBox2
Left = 253
Height = 1
Top = 0
Width = 1
ParentColor = False
end
end
end

View File

@ -60,15 +60,14 @@ type
ColorBox1: TColorBox;
ComboBox1: TComboBox;
FileNameEdit1: TFileNameEdit;
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
PageControl1: TPageControl;
RadioGroup1: TRadioGroup;
TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
procedure FormCreate(Sender: TObject);
private
{ private declarations }
@ -97,7 +96,7 @@ const
{$ENDIF}
implementation
{$IF (FPC_FULLVERSION >= 30101)}
uses rxdconst;
uses rxdconst, LCLIntf;
{$R *.lfm}
@ -107,11 +106,9 @@ procedure TRxDBGridExportPdfSetupForm.FormCreate(Sender: TObject);
var
c: TPDFPaperType;
begin
PageControl1.ActivePageIndex:=0;
Caption:=sExportParams;
TabSheet1.Caption:=sGlobal;
TabSheet2.Caption:=sPDFOptions;
GroupBox1.Caption:=sGlobal;
GroupBox2.Caption:=sPDFOptions;
Label1.Caption:=sExportFileName;
cbOpenAfterExport.Caption:=sOpenAfterExport;
cbExportColumnHeader.Caption:=sExportColumnHeader;