uViewDetallesBase: Fallo al pegar desde el portapapeles. Pega siempre en los conceptos aunque el usuario no esté trabajando en el grid.

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@661 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
David Arranz 2008-10-03 08:43:00 +00:00
parent e3d660e36d
commit ad0b8c241e
2 changed files with 38 additions and 34 deletions

View File

@ -10,7 +10,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase
Left = 0
Top = 0
Width = 451
Height = 73
Height = 68
AutoSize = True
ButtonWidth = 141
Caption = 'ToolBar1'
@ -42,29 +42,30 @@ inherited frViewDetallesBase: TfrViewDetallesBase
Top = 0
Action = actSubir
AutoSize = True
Wrap = True
end
object ToolButton4: TToolButton
Left = 184
Top = 0
Left = 0
Top = 22
Action = actBajar
AutoSize = True
end
object ToolButton14: TToolButton
Left = 240
Top = 0
Left = 56
Top = 22
Action = FontEdit1
AutoSize = True
Wrap = True
end
object FontName: TJvFontComboBox
Left = 0
Top = 22
Top = 44
Width = 145
Height = 22
DroppedDownWidth = 145
MaxMRUCount = 0
FontName = 'Tahoma'
ItemIndex = 39
ItemIndex = 40
Options = [foTrueTypeOnly, foNoOEMFonts, foScalableOnly, foWysiWyg]
Sorted = True
TabOrder = 2
@ -74,7 +75,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase
end
object FontSize: TEdit
Left = 145
Top = 22
Top = 44
Width = 26
Height = 22
Hint = 'Font Size|Select font size'
@ -85,7 +86,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase
end
object UpDown1: TUpDown
Left = 171
Top = 22
Top = 44
Width = 16
Height = 22
Associate = FontSize
@ -94,7 +95,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase
end
object ToolButton13: TToolButton
Left = 187
Top = 22
Top = 44
Width = 8
Caption = 'ToolButton13'
ImageIndex = 10
@ -102,55 +103,54 @@ inherited frViewDetallesBase: TfrViewDetallesBase
end
object ToolButton6: TToolButton
Left = 195
Top = 22
Top = 44
Action = RichEditBold1
AutoSize = True
end
object ToolButton7: TToolButton
Left = 261
Top = 22
Top = 44
Action = RichEditItalic1
AutoSize = True
end
object ToolButton8: TToolButton
Left = 328
Top = 22
Top = 44
Action = RichEditUnderline1
AutoSize = True
end
object ToolButton12: TToolButton
Left = 0
Top = 22
Left = 411
Top = 44
Width = 8
Caption = 'ToolButton12'
ImageIndex = 10
Wrap = True
Style = tbsSeparator
end
object ToolButton9: TToolButton
Left = 0
Top = 49
Left = 419
Top = 44
Action = RichEditAlignLeft1
AutoSize = True
end
object ToolButton10: TToolButton
Left = 145
Top = 49
Left = 564
Top = 44
Action = RichEditAlignCenter1
AutoSize = True
end
object ToolButton11: TToolButton
Left = 270
Top = 49
Left = 689
Top = 44
Action = RichEditAlignRight1
AutoSize = True
end
end
object cxGrid: TcxGrid
Left = 0
Top = 99
Top = 94
Width = 451
Height = 205
Height = 210
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@ -161,6 +161,8 @@ inherited frViewDetallesBase: TfrViewDetallesBase
TabOrder = 1
LookAndFeel.Kind = lfStandard
LookAndFeel.NativeStyle = True
ExplicitTop = 99
ExplicitHeight = 205
object cxGridView: TcxGridDBTableView
NavigatorButtons.ConfirmDelete = False
FilterBox.Visible = fvNever
@ -340,11 +342,12 @@ inherited frViewDetallesBase: TfrViewDetallesBase
end
object TBXDock1: TTBXDock
Left = 0
Top = 73
Top = 68
Width = 451
Height = 26
BackgroundOnToolbars = False
UseParentBackground = True
ExplicitTop = 73
object TBXToolbar1: TTBXToolbar
Left = 0
Top = 0

View File

@ -328,7 +328,7 @@ end;
procedure TfrViewDetallesBase.actAnadirCapituloUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := not ReadOnly;
(Sender as TAction).Enabled := not ReadOnly and (cxGrid.Focused);
end;
procedure TfrViewDetallesBase.actAnadirDescuentoExecute(Sender: TObject);
@ -362,7 +362,7 @@ end;
procedure TfrViewDetallesBase.actAnadirDescuentoUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := not ReadOnly;
(Sender as TAction).Enabled := not ReadOnly and (cxGrid.Focused);
end;
procedure TfrViewDetallesBase.actAnadirExecute(Sender: TObject);
@ -424,7 +424,7 @@ end;
procedure TfrViewDetallesBase.actAnadirSubtotalUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := not ReadOnly;
(Sender as TAction).Enabled := not ReadOnly and (cxGrid.Focused);
end;
procedure TfrViewDetallesBase.actAnadirTituloExecute(Sender: TObject);
@ -548,7 +548,7 @@ end;
procedure TfrViewDetallesBase.DoPasteText(Sender: TObject; AText: string);
begin
ShowMessage(AText);
// ShowMessage(AText);
end;
procedure TfrViewDetallesBase.ContraerTodo;
@ -1078,7 +1078,7 @@ end;
procedure TfrViewDetallesBase.actAnchoAutomaticoUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := not IsEmpty;
(Sender as TAction).Enabled := not IsEmpty and (cxGrid.Focused);
end;
procedure TfrViewDetallesBase.actBajarExecute(Sender: TObject);
@ -1118,7 +1118,7 @@ end;
procedure TfrViewDetallesBase.actDetallesCopiarUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := Assigned(cxGridView.Controller.FocusedRow)
(Sender as TAction).Enabled := Assigned(cxGridView.Controller.FocusedRow);
end;
procedure TfrViewDetallesBase.actDetallesCortarExecute(Sender: TObject);
@ -1135,7 +1135,7 @@ end;
procedure TfrViewDetallesBase.actDetallesCortarUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := Assigned(cxGridView.Controller.FocusedRow)
(Sender as TAction).Enabled := Assigned(cxGridView.Controller.FocusedRow);
end;
procedure TfrViewDetallesBase.actDetallesPegarExecute(Sender: TObject);
@ -1151,7 +1151,8 @@ end;
procedure TfrViewDetallesBase.actDetallesPegarUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := HayDatosEnPortapapeles;
(Sender as TAction).Enabled := Assigned(cxGridView.Controller.FocusedRow) and
HayDatosEnPortapapeles;
end;
procedure TfrViewDetallesBase.actSeleccionarTodoExecute(Sender: TObject);
@ -1163,7 +1164,7 @@ end;
procedure TfrViewDetallesBase.actSeleccionarTodoUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := Assigned(DADataSource.DataTable);
(Sender as TAction).Enabled := Assigned(DADataSource.DataTable) and (cxGrid.Focused);
end;
procedure TfrViewDetallesBase.actSubirExecute(Sender: TObject);