From 531d5f1aac8fd92e316278bf4933848c281d03f9 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 8 Oct 2008 11:21:24 +0000 Subject: [PATCH] =?UTF-8?q?uViewDetallesBase:=20deshabilitar=20acciones=20?= =?UTF-8?q?cuando=20el=20dataset=20es=20de=20s=C3=B3lo=20lectura.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@669 0c75b7a4-871f-7646-8a2f-f78d34cc349f --- Source/GUIBase/uViewDetallesBase.dfm | 63 ++++++++++++++-------------- Source/GUIBase/uViewDetallesBase.pas | 7 ++-- 2 files changed, 36 insertions(+), 34 deletions(-) diff --git a/Source/GUIBase/uViewDetallesBase.dfm b/Source/GUIBase/uViewDetallesBase.dfm index 03a7fb70..3e53ea78 100644 --- a/Source/GUIBase/uViewDetallesBase.dfm +++ b/Source/GUIBase/uViewDetallesBase.dfm @@ -1,6 +1,6 @@ inherited frViewDetallesBase: TfrViewDetallesBase - Width = 451 - Height = 304 + Width = 480 + Height = 379 Align = alClient OnCreate = CustomViewCreate OnDestroy = CustomViewDestroy @@ -9,8 +9,8 @@ inherited frViewDetallesBase: TfrViewDetallesBase object ToolBar1: TToolBar Left = 0 Top = 0 - Width = 451 - Height = 68 + Width = 480 + Height = 73 AutoSize = True ButtonWidth = 141 Caption = 'ToolBar1' @@ -25,6 +25,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase TabOrder = 0 Transparent = True Visible = False + ExplicitWidth = 451 object ToolButton1: TToolButton Left = 0 Top = 0 @@ -42,24 +43,23 @@ inherited frViewDetallesBase: TfrViewDetallesBase Top = 0 Action = actSubir AutoSize = True - Wrap = True end object ToolButton4: TToolButton - Left = 0 - Top = 22 + Left = 184 + Top = 0 Action = actBajar AutoSize = True end object ToolButton14: TToolButton - Left = 56 - Top = 22 + Left = 240 + Top = 0 Action = FontEdit1 AutoSize = True Wrap = True end object FontName: TJvFontComboBox Left = 0 - Top = 44 + Top = 22 Width = 145 Height = 22 DroppedDownWidth = 145 @@ -75,7 +75,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase end object FontSize: TEdit Left = 145 - Top = 44 + Top = 22 Width = 26 Height = 22 Hint = 'Font Size|Select font size' @@ -86,7 +86,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase end object UpDown1: TUpDown Left = 171 - Top = 44 + Top = 22 Width = 16 Height = 22 Associate = FontSize @@ -95,7 +95,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase end object ToolButton13: TToolButton Left = 187 - Top = 44 + Top = 22 Width = 8 Caption = 'ToolButton13' ImageIndex = 10 @@ -103,54 +103,55 @@ inherited frViewDetallesBase: TfrViewDetallesBase end object ToolButton6: TToolButton Left = 195 - Top = 44 + Top = 22 Action = RichEditBold1 AutoSize = True end object ToolButton7: TToolButton Left = 261 - Top = 44 + Top = 22 Action = RichEditItalic1 AutoSize = True end object ToolButton8: TToolButton Left = 328 - Top = 44 + Top = 22 Action = RichEditUnderline1 AutoSize = True end object ToolButton12: TToolButton - Left = 411 - Top = 44 + Left = 0 + Top = 22 Width = 8 Caption = 'ToolButton12' ImageIndex = 10 + Wrap = True Style = tbsSeparator end object ToolButton9: TToolButton - Left = 419 - Top = 44 + Left = 0 + Top = 49 Action = RichEditAlignLeft1 AutoSize = True end object ToolButton10: TToolButton - Left = 564 - Top = 44 + Left = 145 + Top = 49 Action = RichEditAlignCenter1 AutoSize = True end object ToolButton11: TToolButton - Left = 689 - Top = 44 + Left = 270 + Top = 49 Action = RichEditAlignRight1 AutoSize = True end end object cxGrid: TcxGrid Left = 0 - Top = 94 - Width = 451 - Height = 210 + Top = 99 + Width = 480 + Height = 280 Align = alClient Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -161,7 +162,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase TabOrder = 1 LookAndFeel.Kind = lfStandard LookAndFeel.NativeStyle = True - ExplicitTop = 99 + ExplicitWidth = 451 ExplicitHeight = 205 object cxGridView: TcxGridDBTableView NavigatorButtons.ConfirmDelete = False @@ -342,12 +343,12 @@ inherited frViewDetallesBase: TfrViewDetallesBase end object TBXDock1: TTBXDock Left = 0 - Top = 68 - Width = 451 + Top = 73 + Width = 480 Height = 26 BackgroundOnToolbars = False UseParentBackground = True - ExplicitTop = 73 + ExplicitWidth = 451 object TBXToolbar1: TTBXToolbar Left = 0 Top = 0 diff --git a/Source/GUIBase/uViewDetallesBase.pas b/Source/GUIBase/uViewDetallesBase.pas index 96cdf2d1..37c3b9fb 100644 --- a/Source/GUIBase/uViewDetallesBase.pas +++ b/Source/GUIBase/uViewDetallesBase.pas @@ -1135,7 +1135,8 @@ end; procedure TfrViewDetallesBase.actDetallesCortarUpdate(Sender: TObject); begin inherited; - (Sender as TAction).Enabled := Assigned(cxGridView.Controller.FocusedRow); + (Sender as TAction).Enabled := Assigned(cxGridView.Controller.FocusedRow) + and not ReadOnly ; end; procedure TfrViewDetallesBase.actDetallesPegarExecute(Sender: TObject); @@ -1151,8 +1152,8 @@ end; procedure TfrViewDetallesBase.actDetallesPegarUpdate(Sender: TObject); begin inherited; - (Sender as TAction).Enabled := Assigned(cxGridView.Controller.FocusedRow) and - HayDatosEnPortapapeles; + (Sender as TAction).Enabled := Assigned(cxGridView.Controller.FocusedRow) + and not ReadOnly and HayDatosEnPortapapeles; end; procedure TfrViewDetallesBase.actSeleccionarTodoExecute(Sender: TObject);