You've already forked lazarus-ccr
RxFPC:Fix RxToolbar setup dialog. In RxDBGridExportSpreadSheet for footer row SUM value exported as numeric
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4586 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -7,12 +7,16 @@ uses
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, Unit1, rxnew
|
||||
Forms,
|
||||
sysutils,
|
||||
Unit1,
|
||||
rxnew
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
DefaultFormatSettings.ThousandSeparator:=' ';
|
||||
RequireDerivedFormResource := True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
|
@ -3,15 +3,14 @@
|
||||
<ProjectSession>
|
||||
<Version Value="9"/>
|
||||
<BuildModes Active="Default"/>
|
||||
<Units Count="5">
|
||||
<Units Count="6">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<WindowIndex Value="-1"/>
|
||||
<TopLine Value="-1"/>
|
||||
<CursorPos X="-1" Y="-1"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<CursorPos Y="20"/>
|
||||
<UsageCount Value="21"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
@ -20,9 +19,8 @@
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<TopLine Value="10"/>
|
||||
<CursorPos X="46" Y="23"/>
|
||||
<TopLine Value="3"/>
|
||||
<CursorPos X="5" Y="22"/>
|
||||
<UsageCount Value="21"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
@ -45,14 +43,23 @@
|
||||
<Unit4>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<UnitName Value="RxDBGridExportSpreadSheet"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="35"/>
|
||||
<CursorPos X="34" Y="54"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<TopLine Value="317"/>
|
||||
<CursorPos X="13" Y="334"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<TopLine Value="290"/>
|
||||
<CursorPos X="14" Y="307"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit5>
|
||||
</Units>
|
||||
<JumpHistory Count="22" HistoryIndex="21">
|
||||
<JumpHistory Count="30" HistoryIndex="28">
|
||||
<Position1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
</Position1>
|
||||
@ -140,6 +147,38 @@
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="23" Column="46" TopLine="10"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="25" Column="27" TopLine="10"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="53" Column="99" TopLine="41"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="52" Column="9" TopLine="40"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="1552" Column="3" TopLine="1550"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="52" Column="9" TopLine="40"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="22" Column="5" TopLine="3"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="335" Column="70" TopLine="317"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||
<Caret Line="265" Column="71" TopLine="232"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectSession>
|
||||
</CONFIG>
|
||||
|
Binary file not shown.
@ -7,20 +7,21 @@ object Form1: TForm1
|
||||
ClientHeight = 527
|
||||
ClientWidth = 746
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '1.3'
|
||||
LCLVersion = '1.7'
|
||||
object RxDBGrid1: TRxDBGrid
|
||||
Left = 0
|
||||
Height = 457
|
||||
Top = 70
|
||||
Width = 746
|
||||
ColumnDefValues.BlobText = '(blob)'
|
||||
TitleButtons = False
|
||||
AutoSort = True
|
||||
Columns = <
|
||||
item
|
||||
Color = clMoneyGreen
|
||||
Title.Alignment = taCenter
|
||||
Title.Caption = 'CODE'
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'CODE'
|
||||
Width = 90
|
||||
FieldName = 'CODE'
|
||||
EditButtons = <>
|
||||
@ -28,12 +29,13 @@ object Form1: TForm1
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Color = clAqua
|
||||
Title.Alignment = taCenter
|
||||
Title.Caption = 'NAME'
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'NAME'
|
||||
Width = 350
|
||||
FieldName = 'NAME'
|
||||
EditButtons = <>
|
||||
@ -41,11 +43,12 @@ object Form1: TForm1
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Caption = 'PRICE'
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'PRICE'
|
||||
Width = 120
|
||||
FieldName = 'PRICE'
|
||||
EditButtons = <>
|
||||
@ -53,6 +56,10 @@ object Form1: TForm1
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footer.Alignment = taRightJustify
|
||||
Footer.FieldName = 'PRICE'
|
||||
Footer.ValueType = fvtSum
|
||||
Footers = <>
|
||||
end>
|
||||
KeyStrokes = <
|
||||
item
|
||||
@ -110,7 +117,12 @@ object Form1: TForm1
|
||||
ShortCut = 16451
|
||||
Enabled = True
|
||||
end>
|
||||
OptionsRx = [rdgAllowColumnsForm, rdgAllowDialogFind, rdgAllowToolMenu]
|
||||
FooterOptions.Active = True
|
||||
FooterOptions.Color = clYellow
|
||||
FooterOptions.RowCount = 1
|
||||
OptionsRx = [rdgAllowColumnsForm, rdgAllowDialogFind, rdgFooterRows, rdgAllowToolMenu]
|
||||
FooterColor = clYellow
|
||||
FooterRowCount = 1
|
||||
Align = alClient
|
||||
Color = clWindow
|
||||
DrawFullLine = False
|
||||
@ -137,35 +149,20 @@ object Form1: TForm1
|
||||
AnchorSideLeft.Control = Panel1
|
||||
AnchorSideTop.Control = Panel1
|
||||
Left = 7
|
||||
Height = 19
|
||||
Height = 20
|
||||
Top = 7
|
||||
Width = 131
|
||||
Width = 146
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'SpeadSheet file name '
|
||||
ParentColor = False
|
||||
end
|
||||
object CheckBox1: TCheckBox
|
||||
AnchorSideTop.Control = Panel1
|
||||
AnchorSideRight.Control = Panel1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 606
|
||||
Height = 23
|
||||
Top = 7
|
||||
Width = 133
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Open after export'
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 0
|
||||
end
|
||||
object FileNameEdit1: TFileNameEdit
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideTop.Control = Label1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 13
|
||||
Height = 31
|
||||
Top = 32
|
||||
Height = 30
|
||||
Top = 33
|
||||
Width = 275
|
||||
FilterIndex = 0
|
||||
HideDirectories = False
|
||||
@ -173,7 +170,7 @@ object Form1: TForm1
|
||||
NumGlyphs = 1
|
||||
BorderSpacing.Around = 6
|
||||
MaxLength = 0
|
||||
TabOrder = 1
|
||||
TabOrder = 0
|
||||
end
|
||||
object Button1: TButton
|
||||
AnchorSideLeft.Control = FileNameEdit1
|
||||
@ -182,11 +179,11 @@ object Form1: TForm1
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 294
|
||||
Height = 33
|
||||
Top = 31
|
||||
Top = 32
|
||||
Width = 87
|
||||
Caption = 'Export data'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 2
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object RxMemoryData1: TRxMemoryData
|
||||
@ -194,20 +191,15 @@ object Form1: TForm1
|
||||
item
|
||||
Name = 'CODE'
|
||||
DataType = ftInteger
|
||||
Precision = 0
|
||||
Size = 0
|
||||
end
|
||||
item
|
||||
Name = 'NAME'
|
||||
DataType = ftString
|
||||
Precision = 0
|
||||
Size = 300
|
||||
end
|
||||
item
|
||||
Name = 'PRICE'
|
||||
DataType = ftCurrency
|
||||
Precision = 0
|
||||
Size = 0
|
||||
end>
|
||||
PacketRecords = 0
|
||||
left = 368
|
||||
@ -259,6 +251,7 @@ object Form1: TForm1
|
||||
OnBeforeExecute = RxDBGridExportSpreadSheet1BeforeExecute
|
||||
PageName = 'Test page'
|
||||
Options = [ressExportTitle, ressExportColors, ressExportFooter, ressOverwriteExisting]
|
||||
OpenAfterExport = True
|
||||
left = 336
|
||||
top = 256
|
||||
end
|
||||
|
@ -14,7 +14,6 @@ type
|
||||
|
||||
TForm1 = class(TForm)
|
||||
Button1: TButton;
|
||||
CheckBox1: TCheckBox;
|
||||
DataSource1: TDataSource;
|
||||
FileNameEdit1: TFileNameEdit;
|
||||
Label1: TLabel;
|
||||
|
@ -110,6 +110,7 @@ object MainForm: TMainForm
|
||||
Action = actCustom
|
||||
AutoSize = True
|
||||
Margin = 3
|
||||
Visible = False
|
||||
end
|
||||
object BitBtn1: TBitBtn
|
||||
Left = 440
|
||||
@ -165,6 +166,7 @@ object MainForm: TMainForm
|
||||
}
|
||||
OnClick = BitBtn1Click
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
end
|
||||
object ImageList1: TImageList
|
||||
left = 168
|
||||
|
@ -73,7 +73,7 @@ end;
|
||||
|
||||
procedure TMainForm.actCustomExecute(Sender: TObject);
|
||||
begin
|
||||
ToolPanel1.Customize(0); ToolPanel1.:=;
|
||||
ToolPanel1.Customize(0);
|
||||
end;
|
||||
|
||||
|
||||
|
@ -102,8 +102,8 @@ msgstr "Експортувати заголовки стовпців"
|
||||
msgid "Export file name"
|
||||
msgstr "Експортувати назву файлу"
|
||||
|
||||
#: rxdconst.sexprbadcompare
|
||||
# msgid "Compare opertion need fielad and const"
|
||||
#: rxdconst.sexprbadcompare
|
||||
msgid "Compare opertion needs field and const"
|
||||
msgstr "Операції порівняння вимагають наявності поля і константи"
|
||||
|
||||
@ -448,8 +448,8 @@ msgstr "Перемістити вибране поле нижче"
|
||||
msgid "Select all rows"
|
||||
msgstr "Виділити всі рядки"
|
||||
|
||||
#: rxdconst.srxdbgridselectcolumns
|
||||
# msgid "Select visible collumns"
|
||||
#: rxdconst.srxdbgridselectcolumns
|
||||
msgid "Select visible columns"
|
||||
msgstr "Вибір стовпців для відображення"
|
||||
|
||||
@ -478,6 +478,7 @@ msgid "Fill fields in SortField property"
|
||||
msgstr ""
|
||||
|
||||
#: rxdconst.srxfilterformapply
|
||||
msgctxt "rxdconst.srxfilterformapply"
|
||||
msgid "Apply"
|
||||
msgstr "Застосувати"
|
||||
|
||||
|
@ -329,6 +329,12 @@ begin
|
||||
|
||||
if (C.Footer.ValueType <> fvtNon) then
|
||||
begin
|
||||
if C.Footer.ValueType = fvtSum then
|
||||
begin
|
||||
//if C.Footer.FieldName;
|
||||
FWorksheet.WriteNumber(FCurRow, FCurCol, C.Footer.NumericValue, nfFixed, 2)
|
||||
end
|
||||
else
|
||||
FWorksheet.WriteUTF8Text(FCurRow, FCurCol, C.Footer.DisplayText);
|
||||
|
||||
FWorksheet.WriteBorders(FCurRow,FCurCol, [cbNorth, cbWest, cbEast, cbSouth]);
|
||||
|
@ -206,9 +206,9 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
||||
AnchorSideTop.Control = cbTransp
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 163
|
||||
Width = 82
|
||||
Height = 24
|
||||
Top = 178
|
||||
Width = 90
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Show hint'
|
||||
TabOrder = 0
|
||||
@ -218,9 +218,9 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
||||
AnchorSideTop.Control = cbFlatBtn
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 135
|
||||
Width = 94
|
||||
Height = 24
|
||||
Top = 148
|
||||
Width = 101
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Transparent'
|
||||
TabOrder = 1
|
||||
@ -230,9 +230,9 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
||||
AnchorSideTop.Control = RadioGroup1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 107
|
||||
Width = 93
|
||||
Height = 24
|
||||
Top = 118
|
||||
Width = 104
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Flat buttons'
|
||||
TabOrder = 2
|
||||
@ -244,7 +244,7 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
||||
AnchorSideRight.Control = TabSheet2
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 333
|
||||
Height = 95
|
||||
Height = 106
|
||||
Top = 6
|
||||
Width = 312
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -258,7 +258,7 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ClientHeight = 73
|
||||
ClientHeight = 84
|
||||
ClientWidth = 308
|
||||
Items.Strings = (
|
||||
'None'
|
||||
@ -273,7 +273,7 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
||||
AnchorSideTop.Control = TabSheet2
|
||||
AnchorSideRight.Control = Panel2
|
||||
Left = 6
|
||||
Height = 95
|
||||
Height = 106
|
||||
Top = 6
|
||||
Width = 312
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -289,7 +289,7 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ClientHeight = 73
|
||||
ClientHeight = 84
|
||||
ClientWidth = 308
|
||||
Items.Strings = (
|
||||
'Standart'
|
||||
@ -306,7 +306,7 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
||||
AnchorSideBottom.Control = TabSheet2
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 324
|
||||
Height = 388
|
||||
Height = 383
|
||||
Top = 6
|
||||
Width = 3
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
|
@ -175,6 +175,7 @@ begin
|
||||
cbShowCaption.Checked:=TToolbarItem(Items.Objects[ItemIndex]).ShowCaption;
|
||||
end;
|
||||
end;
|
||||
UpdateStates;
|
||||
end;
|
||||
|
||||
procedure TToolPanelSetupForm.cbShowCaptionChange(Sender: TObject);
|
||||
@ -233,11 +234,12 @@ begin
|
||||
|
||||
BitBtn6.Enabled:=ListBtnVisible.Items.Count>0;
|
||||
BitBtn5.Enabled:=ListBtnVisible.Items.Count>0;
|
||||
cbShowCaption.Enabled:=ListBtnVisible.Items.Count>0;
|
||||
cbShowCaption.Enabled:=(ListBtnVisible.Items.Count>0) and (ListBtnVisible.ItemIndex>=0);
|
||||
|
||||
BitBtn4.Enabled:=ListBtnAvaliable.Items.Count>0;
|
||||
BitBtn3.Enabled:=ListBtnAvaliable.Items.Count>0;
|
||||
cbFlatBtn.Checked:=tpTransparentBtns in FToolPanel.Options;
|
||||
|
||||
cbFlatBtn.Checked:=tpFlatBtns in FToolPanel.Options;
|
||||
end;
|
||||
|
||||
procedure TToolPanelSetupForm.Localize;
|
||||
|
@ -114,9 +114,7 @@ type
|
||||
private
|
||||
FButton: TToolbarButton;
|
||||
FSaveLeft:integer;
|
||||
// FActionLink:TActionLink;
|
||||
function GetAction: TBasicAction;
|
||||
//function GetAutoSize: boolean;
|
||||
function GetButtonStyle: TToolbarButtonStyle;
|
||||
function GetDropDownMenu: TPopupMenu;
|
||||
function GetGroupIndex: Integer;
|
||||
@ -128,9 +126,7 @@ type
|
||||
function GetTop: Integer;
|
||||
function GetVisible: boolean;
|
||||
function GetWidth: Integer;
|
||||
// procedure OnActionChanges(Sender: TObject);
|
||||
procedure SetAction(const AValue: TBasicAction);
|
||||
//procedure SetAutoSize(const AValue: boolean);
|
||||
procedure SetButtonStyle(const AValue: TToolbarButtonStyle);
|
||||
procedure SetDropDownMenu(const AValue: TPopupMenu);
|
||||
procedure SetGroupIndex(const AValue: Integer);
|
||||
@ -151,7 +147,6 @@ type
|
||||
destructor Destroy; override;
|
||||
published
|
||||
property Action:TBasicAction read GetAction write SetAction;
|
||||
//property AutoSize:boolean read GetAutoSize write SetAutoSize default true;
|
||||
property Visible:boolean read GetVisible write SetVisible;
|
||||
property Left: Integer read GetLeft write SetLeft;
|
||||
property Height: Integer read GetHeight write SetHeight;
|
||||
|
Reference in New Issue
Block a user