Muchas gracias a ambos por responder.
Les dejo el código del formulario en el que lo estoy implementando (le quité el código de los procedimientos que consideré poco relevantes para que no quede tan largo):
Código Delphi
[-]unit Tarjetas;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, Spin, IniFiles, XPStyleActnCtrls,
ActnList, ActnMan, ToolWin, ActnCtrls, StdStyleActnCtrls, Buttons, StrUtils,
Tipos, System.Actions, PngSpeedButton, System.UITypes;
type
TForm_Tarjetas = class(TForm)
ActionManager: TActionManager;
ActionToolBar: TActionToolBar;
actAceptar: TAction;
actCancelar: TAction;
actCredito: TAction;
actCtaCte: TAction;
actDebito: TAction;
actEfectivo: TAction;
btnAceptar: TPngSpeedButton;
btnCancelar: TPngSpeedButton;
cbCredito: TComboBox;
cbCtaCte: TComboBox;
cbDebito: TComboBox;
eCuotas: TEdit;
eInteres: TEdit;
eTotal: TEdit;
lCuotas: TLabel;
lInteres: TLabel;
lTotal: TLabel;
Panel: TPanel;
seCuotas: TSpinEdit;
procedure actAceptarExecute(Sender: TObject);
procedure actCancelarExecute(Sender: TObject);
procedure actCreditoExecute(Sender: TObject);
procedure actCtaCteExecute(Sender: TObject);
procedure actDebitoExecute(Sender: TObject);
procedure actEfectivoExecute(Sender: TObject);
procedure cbCreditoChange(Sender: TObject);
procedure eInteresExit(Sender: TObject);
procedure eInteresKeyPress(Sender: TObject; var Key: Char);
procedure eInteresKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure FormKeyPress(Sender: TObject; var Key: Char);
procedure FormShow(Sender: TObject);
procedure seCuotasChange(Sender: TObject);
procedure seCuotasKeyPress(Sender: TObject; var Key: Char);
private
Archivo_Tarjetas : TIniFile;
Venta : TDatosPago;
procedure Actualizar_Total(Interes_Personalizado: Boolean);
procedure ResetControls;
public
property DatosPago:TDatosPago read Venta write Venta;
procedure Show; reintroduce;
function ShowModal: Integer; override;
end;
var
Form_Tarjetas: TForm_Tarjetas;
implementation
{$R *.dfm}
uses
Principal, Varios;
procedure TForm_Tarjetas.actEfectivoExecute(Sender: TObject);
begin
cbDebito.Visible := FALSE;
cbCredito.Visible := FALSE;
cbCtaCte.Visible := FALSE;
lCuotas.Visible := FALSE;
seCuotas.Visible := FALSE;
eCuotas.Visible := FALSE;
lInteres.Visible := FALSE;
eInteres.Visible := FALSE;
eTotal.Text := Venta.Total;
end;
procedure TForm_Tarjetas.actDebitoExecute(Sender: TObject);
begin
cbDebito.Visible := TRUE;
cbCredito.Visible := FALSE;
cbCtaCte.Visible := FALSE;
lCuotas.Visible := FALSE;
seCuotas.Visible := FALSE;
eCuotas.Visible := FALSE;
lInteres.Visible := FALSE;
eInteres.Visible := FALSE;
eTotal.Text := Venta.Total;
end;
procedure TForm_Tarjetas.actCreditoExecute(Sender: TObject);
begin
cbDebito.Visible := FALSE;
cbCredito.Visible := TRUE;
cbCtaCte.Visible := FALSE;
lCuotas.Visible := TRUE;
seCuotas.Visible := TRUE;
eCuotas.Visible := TRUE;
lInteres.Visible := TRUE;
eInteres.Visible := TRUE;
seCuotas.Text := IntToStr(Venta.Cuotas);
Actualizar_Total(FALSE);
end;
procedure TForm_Tarjetas.actCtaCteExecute(Sender: TObject);
begin
cbCtaCte.Visible := TRUE;
cbDebito.Visible := FALSE;
cbCredito.Visible := FALSE;
lCuotas.Visible := FALSE;
seCuotas.Visible := FALSE;
eCuotas.Visible := FALSE;
lInteres.Visible := FALSE;
eInteres.Visible := FALSE;
eTotal.Text := Venta.Total;
end;
procedure TForm_Tarjetas.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Archivo_Tarjetas.Free;
end;
procedure TForm_Tarjetas.ResetControls;
begin
Hide;
Archivo_Tarjetas := TIniFile.Create (RutaAplicacion+'Datos\Tarjetas\Tarjetas.ini');
ActualizarCombo(cbDebito, TARJETA, '2');
ActualizarCombo(cbCredito, TARJETA, '3');
ActualizarComboClientes(cbCtaCte);
cbDebito.ItemIndex := 0;
cbCredito.ItemIndex := 0;
seCuotas.Alignment := taRightJustify;
Case Venta.FormaPago of
Contado :
actEfectivo.Execute;
Credito :
begin
If Venta.Tarjeta <> '' then
cbCredito.ItemIndex := cbCredito.Items.IndexOf(Venta.Tarjeta);
actCredito.Execute;
end;
Debito :
begin
If Venta.Tarjeta <> '' then
cbDebito.ItemIndex := cbDebito.Items.IndexOf(Venta.Tarjeta);
actDebito.Execute;
end;
CtaCte :
begin
If Venta.Cliente <> '' then
cbCtaCte.ItemIndex := cbCtaCte.Items.IndexOf(Venta.Cliente);
actCtaCte.Execute;
end;
end;
end;
procedure TForm_Tarjetas.Show;
begin
ResetControls;
inherited Show;
end;
function TForm_Tarjetas.ShowModal: Integer;
begin
ResetControls;
Result := inherited ShowModal;
end;
end.
No lo mencioné, pero el defecto no lo alcanzo a percibir en mi PC (o al menos no se nota tanto)
Yo creo que es porque es una máquina más nueva que en la PC dónde se usa el programa.
Saludos y gracias!!!