sldiscountmode.pas

来自「详细的ERP设计资料」· PAS 代码 · 共 53 行

PAS
53
字号
unit SLDiscountMode;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, WSCstFrm, StdCtrls, GEdit, ExtCtrls;

type
  TSLDiscountModeForm = class(TWSCustomForm)
    RadioGroup1: TRadioGroup;
    RadioButton1: TRadioButton;
    RadioButton2: TRadioButton;
    GEdit1: TGEdit;
    GEdit2: TGEdit;
    StaticText1: TStaticText;
    StaticText2: TStaticText;
    procedure RadioButton1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  SLDiscountModeForm: TSLDiscountModeForm;

implementation

{$R *.dfm}

procedure TSLDiscountModeForm.RadioButton1Click(Sender: TObject);
begin
  inherited;
  GEdit1.Enabled :=RadioButton1.Checked;
  GEdit2.Enabled :=not RadioButton1.Checked;
  if not GEdit1.Enabled then
    begin
      GEdit1.Enabled :=true;
      GEdit1.text :='0.00';
      GEdit1.Enabled :=false;
    end;
    
  if not GEdit2.Enabled then
    begin
      GEdit2.Enabled :=true;
      GEdit2.text :='0.00';
      GEdit2.Enabled :=false;
    end;
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?