diff --git a/components/rx/trunk/Demos/RxDBGrid_ExportSpreadsheet/project1.lpr b/components/rx/trunk/Demos/RxDBGrid_ExportSpreadsheet/project1.lpr index 2eea9e5ee..f3a8c0ca2 100644 --- a/components/rx/trunk/Demos/RxDBGrid_ExportSpreadsheet/project1.lpr +++ b/components/rx/trunk/Demos/RxDBGrid_ExportSpreadsheet/project1.lpr @@ -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); diff --git a/components/rx/trunk/Demos/RxDBGrid_ExportSpreadsheet/project1.lps b/components/rx/trunk/Demos/RxDBGrid_ExportSpreadsheet/project1.lps index 8a51b701b..a6a40aa81 100644 --- a/components/rx/trunk/Demos/RxDBGrid_ExportSpreadsheet/project1.lps +++ b/components/rx/trunk/Demos/RxDBGrid_ExportSpreadsheet/project1.lps @@ -3,15 +3,14 @@ - + - - - - + + + @@ -20,9 +19,8 @@ - - - + + @@ -45,14 +43,23 @@ - - - + + + + + + + + + + + + - + @@ -140,6 +147,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/components/rx/trunk/Demos/RxDBGrid_ExportSpreadsheet/project1.res b/components/rx/trunk/Demos/RxDBGrid_ExportSpreadsheet/project1.res index 7c6cf3e4b..e994dfa65 100644 Binary files a/components/rx/trunk/Demos/RxDBGrid_ExportSpreadsheet/project1.res and b/components/rx/trunk/Demos/RxDBGrid_ExportSpreadsheet/project1.res differ diff --git a/components/rx/trunk/Demos/RxDBGrid_ExportSpreadsheet/unit1.lfm b/components/rx/trunk/Demos/RxDBGrid_ExportSpreadsheet/unit1.lfm index 15cac7dd5..c2f23bf09 100644 --- a/components/rx/trunk/Demos/RxDBGrid_ExportSpreadsheet/unit1.lfm +++ b/components/rx/trunk/Demos/RxDBGrid_ExportSpreadsheet/unit1.lfm @@ -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 diff --git a/components/rx/trunk/Demos/RxDBGrid_ExportSpreadsheet/unit1.pas b/components/rx/trunk/Demos/RxDBGrid_ExportSpreadsheet/unit1.pas index 7cf801060..9d65a21d5 100644 --- a/components/rx/trunk/Demos/RxDBGrid_ExportSpreadsheet/unit1.pas +++ b/components/rx/trunk/Demos/RxDBGrid_ExportSpreadsheet/unit1.pas @@ -14,7 +14,6 @@ type TForm1 = class(TForm) Button1: TButton; - CheckBox1: TCheckBox; DataSource1: TDataSource; FileNameEdit1: TFileNameEdit; Label1: TLabel; diff --git a/components/rx/trunk/Demos/ToolPanel/unit1.lfm b/components/rx/trunk/Demos/ToolPanel/unit1.lfm index 8610f58dc..49dbda6de 100644 --- a/components/rx/trunk/Demos/ToolPanel/unit1.lfm +++ b/components/rx/trunk/Demos/ToolPanel/unit1.lfm @@ -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 diff --git a/components/rx/trunk/Demos/ToolPanel/unit1.pas b/components/rx/trunk/Demos/ToolPanel/unit1.pas index b7904fc10..939ca0ff5 100644 --- a/components/rx/trunk/Demos/ToolPanel/unit1.pas +++ b/components/rx/trunk/Demos/ToolPanel/unit1.pas @@ -73,7 +73,7 @@ end; procedure TMainForm.actCustomExecute(Sender: TObject); begin - ToolPanel1.Customize(0); ToolPanel1.:=; + ToolPanel1.Customize(0); end; diff --git a/components/rx/trunk/languages/rxdconst.uk.po b/components/rx/trunk/languages/rxdconst.uk.po index de5c02ead..c062392ac 100644 --- a/components/rx/trunk/languages/rxdconst.uk.po +++ b/components/rx/trunk/languages/rxdconst.uk.po @@ -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 "Застосувати" diff --git a/components/rx/trunk/rxdbgridexportspreadsheet.pas b/components/rx/trunk/rxdbgridexportspreadsheet.pas index 6b8db4d07..ba82db347 100644 --- a/components/rx/trunk/rxdbgridexportspreadsheet.pas +++ b/components/rx/trunk/rxdbgridexportspreadsheet.pas @@ -329,7 +329,13 @@ begin if (C.Footer.ValueType <> fvtNon) then begin - FWorksheet.WriteUTF8Text(FCurRow, FCurCol, C.Footer.DisplayText); + 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]); FWorksheet.WriteBorderColor(FCurRow,FCurCol, cbNorth, scColorBlack); diff --git a/components/rx/trunk/rxtbrsetup.lfm b/components/rx/trunk/rxtbrsetup.lfm index f96aecde2..937097340 100644 --- a/components/rx/trunk/rxtbrsetup.lfm +++ b/components/rx/trunk/rxtbrsetup.lfm @@ -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] diff --git a/components/rx/trunk/rxtbrsetup.pas b/components/rx/trunk/rxtbrsetup.pas index 729d35b60..378000ab2 100644 --- a/components/rx/trunk/rxtbrsetup.pas +++ b/components/rx/trunk/rxtbrsetup.pas @@ -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; diff --git a/components/rx/trunk/rxtoolbar.pas b/components/rx/trunk/rxtoolbar.pas index b650b6762..30affb2bf 100644 --- a/components/rx/trunk/rxtoolbar.pas +++ b/components/rx/trunk/rxtoolbar.pas @@ -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;