From ba5e8299bb47de1bcf499077a66853869689bb31 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 9 Jan 2008 12:02:58 +0000 Subject: [PATCH] - Repaso general columnas de detalles - Contactos: Iconos en los grids. git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@209 0c75b7a4-871f-7646-8a2f-f78d34cc349f --- Source/GUIBase/GUIBase.dproj | 35 ++-- Source/GUIBase/uViewDetallesBase.dfm | 118 +++++++------ Source/GUIBase/uViewDetallesBase.pas | 72 ++++++-- Source/GUIBase/uViewDetallesDTO.dfm | 157 +++++++++--------- Source/GUIBase/uViewGrid.dfm | 69 ++++---- Source/GUIBase/uViewGrid.pas | 59 ++++--- .../Articulos/Views/Articulos_view.dproj | 14 +- .../Views/uViewDetallesArticulos.dfm | 102 +++++++++++- .../Contactos/Views/Contactos_view.dproj | 24 +-- .../Contactos/Views/Contactos_view.res | Bin 4748 -> 384 bytes .../Contactos/Views/uEditorEmpleados.dfm | 36 +--- .../Modulos/Contactos/Views/uViewClientes.dfm | 12 +- .../Modulos/Contactos/Views/uViewClientes.pas | 6 +- .../Contactos/Views/uViewContactos.dfm | 12 +- .../Contactos/Views/uViewContactos.pas | 2 +- .../Contactos/Views/uViewEmpleados.dfm | 46 ++++- .../Contactos/Views/uViewProveedores.dfm | 9 +- .../Contactos/Views/uViewProveedores.pas | 8 +- 18 files changed, 469 insertions(+), 312 deletions(-) diff --git a/Source/GUIBase/GUIBase.dproj b/Source/GUIBase/GUIBase.dproj index c079d2fd..8243ffa4 100644 --- a/Source/GUIBase/GUIBase.dproj +++ b/Source/GUIBase/GUIBase.dproj @@ -1,4 +1,5 @@ - + + {0ca27a95-0b81-4724-84bf-8f8ed4e421ae} GUIBase.dpk @@ -57,22 +58,22 @@ MainSource - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + +
fDialogBase
diff --git a/Source/GUIBase/uViewDetallesBase.dfm b/Source/GUIBase/uViewDetallesBase.dfm index 49917b1d..0d83341b 100644 --- a/Source/GUIBase/uViewDetallesBase.dfm +++ b/Source/GUIBase/uViewDetallesBase.dfm @@ -1,6 +1,6 @@ inherited frViewDetallesBase: TfrViewDetallesBase - Width = 823 - Height = 386 + Width = 451 + Height = 304 Align = alClient OnCreate = CustomViewCreate OnDestroy = CustomViewDestroy @@ -9,8 +9,8 @@ inherited frViewDetallesBase: TfrViewDetallesBase object ToolBar1: TToolBar Left = 0 Top = 0 - Width = 823 - Height = 51 + Width = 451 + Height = 73 AutoSize = True ButtonWidth = 141 Caption = 'ToolBar1' @@ -25,8 +25,6 @@ inherited frViewDetallesBase: TfrViewDetallesBase TabOrder = 0 Transparent = True Visible = False - ExplicitWidth = 451 - ExplicitHeight = 73 object ToolButton1: TToolButton Left = 0 Top = 0 @@ -56,16 +54,17 @@ inherited frViewDetallesBase: TfrViewDetallesBase Top = 0 Action = FontEdit1 AutoSize = True + Wrap = True end object FontName: TJvFontComboBox - Left = 305 - Top = 0 + Left = 0 + Top = 22 Width = 145 Height = 22 DroppedDownWidth = 145 MaxMRUCount = 0 FontName = 'Tahoma' - ItemIndex = 35 + ItemIndex = 34 Options = [foTrueTypeOnly, foNoOEMFonts, foScalableOnly, foWysiWyg] Sorted = True TabOrder = 2 @@ -74,8 +73,8 @@ inherited frViewDetallesBase: TfrViewDetallesBase OnClick = FontNameChange end object FontSize: TEdit - Left = 450 - Top = 0 + Left = 145 + Top = 22 Width = 26 Height = 22 Hint = 'Font Size|Select font size' @@ -85,8 +84,8 @@ inherited frViewDetallesBase: TfrViewDetallesBase OnChange = FontSizeChange end object UpDown1: TUpDown - Left = 476 - Top = 0 + Left = 171 + Top = 22 Width = 16 Height = 22 Associate = FontSize @@ -94,71 +93,68 @@ inherited frViewDetallesBase: TfrViewDetallesBase Visible = False end object ToolButton13: TToolButton - Left = 0 - Top = 0 + Left = 187 + Top = 22 Width = 8 Caption = 'ToolButton13' ImageIndex = 10 - Wrap = True Style = tbsSeparator end object ToolButton6: TToolButton - Left = 0 - Top = 30 + Left = 195 + Top = 22 Action = RichEditBold1 AutoSize = True end object ToolButton7: TToolButton - Left = 66 - Top = 30 + Left = 261 + Top = 22 Action = RichEditItalic1 AutoSize = True end object ToolButton8: TToolButton - Left = 133 - Top = 30 + Left = 328 + Top = 22 Action = RichEditUnderline1 AutoSize = True end object ToolButton12: TToolButton - Left = 216 - Top = 30 + Left = 0 + Top = 22 Width = 8 Caption = 'ToolButton12' ImageIndex = 10 + Wrap = True Style = tbsSeparator end object ToolButton9: TToolButton - Left = 224 - Top = 30 + Left = 0 + Top = 52 Action = RichEditAlignLeft1 AutoSize = True end object ToolButton10: TToolButton - Left = 369 - Top = 30 + Left = 145 + Top = 52 Action = RichEditAlignCenter1 AutoSize = True end object ToolButton11: TToolButton - Left = 494 - Top = 30 + Left = 270 + Top = 52 Action = RichEditAlignRight1 AutoSize = True end end object cxGrid: TcxGrid Left = 0 - Top = 77 - Width = 823 - Height = 309 + Top = 99 + Width = 451 + Height = 205 Align = alClient TabOrder = 1 LookAndFeel.Kind = lfStandard LookAndFeel.NativeStyle = True - ExplicitTop = 99 - ExplicitWidth = 451 - ExplicitHeight = 205 object cxGridView: TcxGridDBTableView NavigatorButtons.ConfirmDelete = False FilterBox.Visible = fvNever @@ -197,13 +193,9 @@ inherited frViewDetallesBase: TfrViewDetallesBase OptionsView.CellEndEllipsis = True OptionsView.CellAutoHeight = True OptionsView.ColumnAutoWidth = True - OptionsView.GridLineColor = cl3DLight - OptionsView.GridLines = glVertical + OptionsView.GridLines = glNone OptionsView.GroupByBox = False OptionsView.HeaderEndEllipsis = True - OptionsView.Indicator = True - OptionsView.RowSeparatorColor = clGradientInactiveCaption - OptionsView.RowSeparatorWidth = 1 Styles.OnGetContentStyle = cxGridViewStylesGetContentStyle object cxGridViewID: TcxGridDBColumn DataBinding.FieldName = 'ID' @@ -264,12 +256,12 @@ inherited frViewDetallesBase: TfrViewDetallesBase Properties.NullStyle = nssUnchecked Properties.ValueChecked = 1 Properties.ValueUnchecked = 0 - BestFitMaxWidth = 25 + BestFitMaxWidth = 35 FooterAlignmentHorz = taCenter HeaderAlignmentHorz = taCenter - MinWidth = 50 - Styles.Content = cxStyleColumnaTIPO - Width = 50 + MinWidth = 35 + Options.HorzSizing = False + Width = 35 end object cxGridViewTIPO: TcxGridDBColumn Caption = 'Tipo' @@ -277,10 +269,9 @@ inherited frViewDetallesBase: TfrViewDetallesBase PropertiesClassName = 'TcxImageComboBoxProperties' Properties.ImmediatePost = True Properties.Items = <> - BestFitMaxWidth = 64 + BestFitMaxWidth = 50 MinWidth = 50 - Styles.Content = cxStyleColumnaTIPO - Width = 119 + Width = 50 end object cxGridViewDESCRIPCION: TcxGridDBColumn Caption = 'Concepto' @@ -331,13 +322,11 @@ inherited frViewDetallesBase: TfrViewDetallesBase end object TBXDock1: TTBXDock Left = 0 - Top = 51 - Width = 823 + Top = 73 + Width = 451 Height = 26 BackgroundOnToolbars = False UseParentBackground = True - ExplicitTop = 73 - ExplicitWidth = 451 object TBXToolbar1: TTBXToolbar Left = 0 Top = 0 @@ -729,14 +718,33 @@ inherited frViewDetallesBase: TfrViewDetallesBase Top = 168 PixelsPerInch = 96 object cxStyle_SUBTOTAL: TcxStyle + AssignedValues = [svColor] + Color = 552722127 end object cxStyle_TITULO: TcxStyle + AssignedValues = [svColor] + Color = 546166271 end object cxStyle_DESCUENTO: TcxStyle - end - object cxStyleColumnaTIPO: TcxStyle AssignedValues = [svColor] - Color = cl3DLight + Color = 549510336 + end + object cxStyle_SOLO_LECTURA: TcxStyle + AssignedValues = [svColor] + Color = 15657963 + end + object cxStyle_ESPECIALES: TcxStyle + AssignedValues = [svColor, svTextColor] + Color = 552984534 + TextColor = 547699712 + end + object cxStyle_NORMAL_PAR: TcxStyle + AssignedValues = [svColor] + Color = 552923887 + end + object cxStyle_NORMAL_IMPAR: TcxStyle + AssignedValues = [svColor] + Color = clWindow end end end diff --git a/Source/GUIBase/uViewDetallesBase.pas b/Source/GUIBase/uViewDetallesBase.pas index 9c2ac63f..8f1c0874 100644 --- a/Source/GUIBase/uViewDetallesBase.pas +++ b/Source/GUIBase/uViewDetallesBase.pas @@ -105,8 +105,10 @@ type actDetallesCortar: TAction; actDetallesCopiar: TAction; actDetallesPegar: TAction; - cxStyleColumnaTIPO: TcxStyle; - + cxStyle_SOLO_LECTURA: TcxStyle; + cxStyle_ESPECIALES: TcxStyle; + cxStyle_NORMAL_PAR: TcxStyle; + cxStyle_NORMAL_IMPAR: TcxStyle; procedure actAnadirExecute(Sender: TObject); procedure actEliminarExecute(Sender: TObject); procedure actSubirExecute(Sender: TObject); @@ -190,7 +192,7 @@ implementation {$R *.dfm} uses - uDMBase, uCalculosUtils; + uDMBase, uCalculosUtils, dxOffice11; function EnumFontsProc(var LogFont: TLogFont; var TextMetric: TTextMetric; FontType: Integer; Data: Pointer): Integer; stdcall; @@ -347,26 +349,57 @@ procedure TfrViewDetallesBase.cxGridViewCustomDrawCell( Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); var + R : TRect; + sVal : String ; + iFlag : Integer ; +begin +{ R := AViewInfo.Bounds; + FillGradientRect(ACanvas.Handle, R, clWindow, AViewInfo.EditViewInfo.BackgroundColor, False); + if AViewInfo.GridRecord.Values[TcxGridDBColumn(AViewInfo.Item).Index] <> Null then + begin + sVal := AViewInfo.GridRecord.Values[TcxGridDBColumn(AViewInfo.Item).Index]; + Dec(R.Right); + Inc(R.Left); + case TcxGridDBColumn(AViewInfo.Item).HeaderAlignmentHorz Of + taLeftJustify: iFlag := cxAlignLeft ; + taRightJustify: iFlag := cxAlignRight ; + taCenter: iFlag := cxAlignCenter ; + end;} + {// Draw text transparently + ACanvas.Brush.Style := bsClear ; + ACanvas.DrawTexT(sVal, r, cxAlignVCenter or iFlag);} +// end; + //ADone := True ; +end; + +{var ATipo : String; begin inherited; + if not AViewInfo.Selected then + begin + + end; + ATipo := DarTipoConcepto(AViewInfo.GridRecord); - if (ATipo = TIPO_DETALLE_SUBTOTAL) and (AViewInfo.Item.Index <> cxGridViewTIPO.Index) then + if (ATipo = TIPO_DETALLE_SUBTOTAL) and + not (AViewInfo.Item.Index in [cxGridViewTIPO.Index, cxGridViewVISIBLE.Index]) then begin AViewInfo.EditViewInfo.Paint(ACanvas); - ACanvas.DrawComplexFrame(AViewInfo.Bounds, clBlack, clBlack, [bTop], 1); + AViewInfo.Item.Focused + if not AViewInfo.Item.FocusWithSelection then + FillGradientRect(ACanvas.Handle, AViewInfo.Bounds, clWindow, AViewInfo.EditViewInfo.BackgroundColor, False); + ACanvas.DrawComplexFrame(AViewInfo.Bounds, clBtnShadow, clBtnShadow, [bTop], 1); ADone := True; end else begin - {if ATipo = TIPO_DETALLE_TITULO then - begin - AViewInfo.EditViewInfo.Paint(ACanvas); - ACanvas.DrawComplexFrame(AViewInfo.Bounds, clBlack, clBlack, [bBottom], 1); - ADone := True; - end} + AViewInfo.EditViewInfo.Paint(ACanvas); + if not AViewInfo.Item.FocusWithSelection then + FillGradientRect(ACanvas.Handle, AViewInfo.Bounds, clWindow, AViewInfo.EditViewInfo.BackgroundColor, False); + ADone := True; end; -end; +end;} procedure TfrViewDetallesBase.cxGridViewEditing(Sender: TcxCustomGridTableView; AItem: TcxCustomGridTableItem; var AAllow: Boolean); @@ -491,7 +524,18 @@ procedure TfrViewDetallesBase.cxGridViewStylesGetContentStyle( var ATipo : String; begin - AStyle := NIL; + inherited; + if Assigned(AItem) then + begin + if Odd(ARecord.Index) then + AStyle := cxStyle_NORMAL_PAR + else + AStyle := cxStyle_NORMAL_IMPAR; + end; + + + +{ AStyle := NIL; if Assigned(ARecord) then begin ATipo := DarTipoConcepto(ARecord); @@ -504,7 +548,7 @@ begin if ATipo = TIPO_DETALLE_DESCUENTO then AStyle := cxStyle_DESCUENTO; - end; + end;} end; function TfrViewDetallesBase.DarFuentePorDefecto(const ATipo: String): TFont; diff --git a/Source/GUIBase/uViewDetallesDTO.dfm b/Source/GUIBase/uViewDetallesDTO.dfm index 6df51d38..ea838cab 100644 --- a/Source/GUIBase/uViewDetallesDTO.dfm +++ b/Source/GUIBase/uViewDetallesDTO.dfm @@ -1,9 +1,7 @@ inherited frViewDetallesDTO: TfrViewDetallesDTO - Width = 451 - Height = 304 inherited ToolBar1: TToolBar - Width = 451 - Height = 73 + Height = 95 + ExplicitHeight = 95 inherited ToolButton1: TToolButton ExplicitWidth = 109 end @@ -16,90 +14,94 @@ inherited frViewDetallesDTO: TfrViewDetallesDTO Left = 223 ExplicitLeft = 223 end - inherited ToolButton4: TToolButton - Left = 278 - ExplicitLeft = 278 - end - inherited ToolButton14: TToolButton - Left = 334 + inherited ToolButton13: TToolButton [3] + Left = 0 + Top = 0 Wrap = True - ExplicitLeft = 334 + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitHeight = 30 + end + inherited ToolButton4: TToolButton [4] + Top = 30 end inherited FontName: TJvFontComboBox - Left = 0 - Top = 22 - ExplicitLeft = 0 - ExplicitTop = 22 + Left = 56 + Top = 30 + ExplicitLeft = 56 + ExplicitTop = 30 end - inherited FontSize: TEdit - Left = 145 - Top = 22 - ExplicitLeft = 145 - ExplicitTop = 22 - end - inherited UpDown1: TUpDown - Left = 171 - Top = 22 - ExplicitLeft = 171 - ExplicitTop = 22 - end - inherited ToolButton13: TToolButton - Left = 187 - Top = 22 + inherited ToolButton14: TToolButton [6] + Left = 201 + Top = 30 Wrap = False - ExplicitLeft = 187 - ExplicitTop = 22 - ExplicitHeight = 22 + ExplicitLeft = 201 + ExplicitTop = 30 end - inherited ToolButton6: TToolButton - Left = 195 - Top = 22 - ExplicitLeft = 195 - ExplicitTop = 22 + inherited ToolButton6: TToolButton [7] + Left = 266 + Top = 30 + Wrap = True + ExplicitLeft = 266 + ExplicitTop = 30 end - inherited ToolButton7: TToolButton - Left = 261 - Top = 22 - ExplicitLeft = 261 - ExplicitTop = 22 - end - inherited ToolButton8: TToolButton - Left = 328 - Top = 22 - ExplicitLeft = 328 - ExplicitTop = 22 - end - inherited ToolButton12: TToolButton + inherited FontSize: TEdit [8] Left = 0 - Top = 22 + Top = 52 ExplicitLeft = 0 - ExplicitTop = 22 + ExplicitTop = 52 + end + inherited ToolButton7: TToolButton [9] + Left = 26 + Top = 52 + ExplicitLeft = 26 + ExplicitTop = 52 + end + inherited ToolButton11: TToolButton [10] + Left = 93 + Top = 52 + ExplicitLeft = 93 + ExplicitTop = 52 + end + inherited ToolButton10: TToolButton [11] + Left = 234 + Top = 52 + Wrap = True + ExplicitLeft = 234 + ExplicitTop = 52 + end + inherited UpDown1: TUpDown [12] + Left = 0 + Top = 74 + ExplicitLeft = 0 + ExplicitTop = 74 end inherited ToolButton9: TToolButton - Left = 0 - Top = 52 - ExplicitLeft = 0 - ExplicitTop = 52 + Left = 16 + Top = 74 + ExplicitLeft = 16 + ExplicitTop = 74 end - inherited ToolButton10: TToolButton - Left = 145 - Top = 52 - ExplicitLeft = 145 - ExplicitTop = 52 + inherited ToolButton8: TToolButton [14] + Left = 161 + Top = 74 + ExplicitLeft = 161 + ExplicitTop = 74 end - inherited ToolButton11: TToolButton - Left = 270 - Top = 52 - ExplicitLeft = 270 - ExplicitTop = 52 + inherited ToolButton12: TToolButton [15] + Left = 244 + Top = 74 + ExplicitLeft = 244 + ExplicitTop = 74 end end inherited cxGrid: TcxGrid - Top = 99 - Width = 451 - Height = 205 + Top = 121 + Height = 183 + ExplicitTop = 99 + ExplicitHeight = 205 inherited cxGridView: TcxGridDBTableView - object cxGridViewDESCUENTO: TcxGridDBColumn [6] + object cxGridViewDESCUENTO: TcxGridDBColumn [7] Caption = 'Dto' DataBinding.FieldName = 'DESCUENTO' PropertiesClassName = 'TcxCurrencyEditProperties' @@ -108,7 +110,7 @@ inherited frViewDetallesDTO: TfrViewDetallesDTO Properties.MaxValue = 100.000000000000000000 Width = 30 end - object cxGridViewIMPORTENETO: TcxGridDBColumn [7] + object cxGridViewIMPORTENETO: TcxGridDBColumn [8] Caption = 'Importe neto' DataBinding.ValueType = 'Currency' PropertiesClassName = 'TcxCurrencyEditProperties' @@ -121,8 +123,8 @@ inherited frViewDetallesDTO: TfrViewDetallesDTO HeaderAlignmentHorz = taRightJustify Options.Editing = False end - object cxGridViewIMPORTEPORTE: TcxGridDBColumn [8] - Caption = 'Importe porte' + object cxGridViewIMPORTEPORTE: TcxGridDBColumn [9] + Caption = 'Porte unidad' DataBinding.FieldName = 'IMPORTE_PORTE' PropertiesClassName = 'TcxCurrencyEditProperties' Properties.Alignment.Horz = taRightJustify @@ -133,11 +135,8 @@ inherited frViewDetallesDTO: TfrViewDetallesDTO end end inherited TBXDock1: TTBXDock - Top = 73 - Width = 451 - inherited TBXToolbar1: TTBXToolbar - ExplicitWidth = 451 - end + Top = 95 + ExplicitTop = 68 end inherited ActionListContenido: TActionList inherited actAnadir: TAction diff --git a/Source/GUIBase/uViewGrid.dfm b/Source/GUIBase/uViewGrid.dfm index 2221260d..54eb045b 100644 --- a/Source/GUIBase/uViewGrid.dfm +++ b/Source/GUIBase/uViewGrid.dfm @@ -1,13 +1,13 @@ inherited frViewGrid: TfrViewGrid Width = 554 - Height = 594 + Height = 399 ExplicitWidth = 554 - ExplicitHeight = 594 + ExplicitHeight = 399 object cxGrid: TcxGrid [0] Left = 0 Top = 102 Width = 554 - Height = 466 + Height = 271 Align = alClient Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -43,8 +43,8 @@ inherited frViewGrid: TfrViewGrid OptionsView.ColumnAutoWidth = True OptionsView.DataRowHeight = 22 OptionsView.Footer = True - OptionsView.GridLineColor = clHighlight - OptionsView.GridLines = glHorizontal + OptionsView.GridLineColor = cl3DLight + OptionsView.GridLines = glNone OptionsView.GroupByBox = False OptionsView.HeaderEndEllipsis = True Styles.Inactive = cxStyleSelection @@ -70,19 +70,9 @@ inherited frViewGrid: TfrViewGrid inherited dxLayoutControl1: TdxLayoutControl Width = 554 ExplicitWidth = 554 - inherited txtFiltroTodo: TcxTextEdit - ExplicitWidth = 273 - Width = 273 - end - inherited edtFechaIniFiltro: TcxDateEdit - ExplicitWidth = 121 - Width = 121 - end inherited edtFechaFinFiltro: TcxDateEdit - Left = 344 - ExplicitLeft = 344 - ExplicitWidth = 121 - Width = 121 + Left = 343 + ExplicitLeft = 343 end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel @@ -97,7 +87,7 @@ inherited frViewGrid: TfrViewGrid end object pnlAgrupaciones: TTBXDockablePanel Left = 0 - Top = 568 + Top = 373 MinClientHeight = 8 Align = alBottom Caption = 'pnlAgrupaciones' @@ -107,7 +97,6 @@ inherited frViewGrid: TfrViewGrid SupportedDocks = [dkStandardDock, dkMultiDock] TabOrder = 2 Visible = False - ExplicitWidth = 128 object TBXAlignmentPanel1: TTBXAlignmentPanel Left = 0 Top = 0 @@ -155,7 +144,7 @@ inherited frViewGrid: TfrViewGrid PrinterPage.ScaleMode = smFit PrinterPage._dxMeasurementUnits_ = 0 PrinterPage._dxLastMU_ = 2 - ReportDocument.CreationDate = 39443.818585243050000000 + ReportDocument.CreationDate = 39455.775459884260000000 StyleManager = dxPrintStyleManager1 OptionsCards.Shadow.Depth = 0 OptionsExpanding.ExpandGroupRows = True @@ -188,30 +177,42 @@ inherited frViewGrid: TfrViewGrid Left = 296 Top = 128 PixelsPerInch = 96 - object cxStyleEven: TcxStyle - end - object cxStyleOdd: TcxStyle - AssignedValues = [svColor] - Color = clInactiveCaptionText - end object cxStyleSelection: TcxStyle AssignedValues = [svColor, svTextColor] Color = clHighlight TextColor = clHighlightText end - object cxStyleSinOrden: TcxStyle - end - object cxStyleConOrden: TcxStyle + object cxStyle_NORMAL_PAR: TcxStyle AssignedValues = [svColor] - Color = 16119285 + Color = 552923887 end - object cxStyleFiltered: TcxStyle + object cxStyle_NORMAL_IMPAR: TcxStyle AssignedValues = [svColor] - Color = clInfoBk + Color = clWindow end - object cxStyleFilteredConOrden: TcxStyle + object cxStyle_ORDENADO_PAR: TcxStyle AssignedValues = [svColor] - Color = 14546175 + Color = 15131873 + end + object cxStyle_ORDENADO_IMPAR: TcxStyle + AssignedValues = [svColor] + Color = 16052975 + end + object cxStyle_FILTRADO_PAR: TcxStyle + AssignedValues = [svColor] + Color = 546166271 + end + object cxStyle_FILTRADO_IMPAR: TcxStyle + AssignedValues = [svColor] + Color = 549513214 + end + object cxStyle_FILTRADO_ORDENADO_PAR: TcxStyle + AssignedValues = [svColor] + Color = 545771513 + end + object cxStyle_FILTRADO_ORDENADO_IMPAR: TcxStyle + AssignedValues = [svColor] + Color = 549249528 end end object cxViewGridPopupMenu: TcxGridPopupMenu diff --git a/Source/GUIBase/uViewGrid.pas b/Source/GUIBase/uViewGrid.pas index 18cc7131..636cfdb1 100644 --- a/Source/GUIBase/uViewGrid.pas +++ b/Source/GUIBase/uViewGrid.pas @@ -36,15 +36,9 @@ type dxComponentPrinter: TdxComponentPrinter; dxPSEngineController1: TdxPSEngineController; cxStyleRepository1: TcxStyleRepository; - cxStyleEven: TcxStyle; - cxStyleOdd: TcxStyle; cxStyleSelection: TcxStyle; - cxStyleSinOrden: TcxStyle; - cxStyleConOrden: TcxStyle; cxViewGridPopupMenu: TcxGridPopupMenu; dxComponentPrinterLink: TdxGridReportLink; - cxStyleFiltered: TcxStyle; - cxStyleFilteredConOrden: TcxStyle; frViewFiltroBase1: TfrViewFiltroBase; ActionList1: TActionList; PngImageList10: TPngImageList; @@ -61,6 +55,14 @@ type cxStyleSelectionInforme: TcxStyle; dxPrintStyleManager1: TdxPrintStyleManager; dxPrintStyleManager1Style1: TdxPSPrintStyle; + cxStyle_NORMAL_PAR: TcxStyle; + cxStyle_NORMAL_IMPAR: TcxStyle; + cxStyle_ORDENADO_PAR: TcxStyle; + cxStyle_ORDENADO_IMPAR: TcxStyle; + cxStyle_FILTRADO_PAR: TcxStyle; + cxStyle_FILTRADO_IMPAR: TcxStyle; + cxStyle_FILTRADO_ORDENADO_PAR: TcxStyle; + cxStyle_FILTRADO_ORDENADO_IMPAR: TcxStyle; procedure cxGridViewStylesGetContentStyle( Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out AStyle: TcxStyle); @@ -71,7 +73,6 @@ type function GetGrid : TcxGrid; override; function GetFocusedView : TcxGridDBTableView; override; procedure SetPopupMenu(const Value: TPopupMenu); override; - procedure FilterChanged(Sender : TObject); override; procedure OnChangeValoresFiltro(Sender: TObject); procedure SetViewFiltros(const Value: IViewFiltroBase); override; function AddFilterGrid(const Operacion: tcxFilterBoolOperatorKind): TcxFilterCriteriaItemList; @@ -86,7 +87,7 @@ type implementation uses - uDMBase, uDBSelectionListUtils; + uDMBase, uDBSelectionListUtils, dxOffice11; {$R *.dfm} @@ -188,12 +189,33 @@ begin inherited; if Assigned(AItem) then begin - if AItem.SortOrder = soNone then - AStyle := cxStyleSinOrden - else begin - AStyle := cxStyleConOrden; - if Filtered then - AStyle := cxStyleFilteredConOrden; + if Odd(ARecord.Index) then + AStyle := cxStyle_NORMAL_PAR + else + AStyle := cxStyle_NORMAL_IMPAR; + + if (AItem.SortOrder <> soNone) then + begin + if Odd(ARecord.Index) then + AStyle := cxStyle_ORDENADO_PAR + else + AStyle := cxStyle_ORDENADO_IMPAR; + end; + + if Filtered then + begin + if Odd(ARecord.Index) then + AStyle := cxStyle_FILTRADO_PAR + else + AStyle := cxStyle_FILTRADO_IMPAR; + + if (AItem.SortOrder <> soNone) then + begin + if Odd(ARecord.Index) then + AStyle := cxStyle_FILTRADO_ORDENADO_PAR + else + AStyle := cxStyle_FILTRADO_ORDENADO_IMPAR; + end; end; end; end; @@ -209,14 +231,5 @@ begin Result := not (cxGridView.Controller.FocusedRecord is TcxGridGroupRow); end; -procedure TfrViewGrid.FilterChanged(Sender: TObject); -begin - inherited; - if Filtered then - _FocusedView.Styles.Content := cxStyleFiltered - else - _FocusedView.Styles.Content := nil; -end; - end. diff --git a/Source/Modulos/Articulos/Views/Articulos_view.dproj b/Source/Modulos/Articulos/Views/Articulos_view.dproj index d1560b90..98437d09 100644 --- a/Source/Modulos/Articulos/Views/Articulos_view.dproj +++ b/Source/Modulos/Articulos/Views/Articulos_view.dproj @@ -54,11 +54,12 @@ MainSource - - - - - + + + + + +
fEditorArticulo
@@ -72,7 +73,6 @@
fEditorElegirArticulos
TfEditorElegirArticulos
-
frViewArticulo
TFrame @@ -89,7 +89,7 @@