【发布时间】:2014-02-12 07:52:51
【问题描述】:
我的教科书上说我需要用三个按钮制作一个捐赠程序,每个按钮代表一定数量的钱。按下按钮后,标签上应显示“捐赠金额”。
例如,如果我按下$10 按钮,它将显示The total amount raised so far is $10。然后,如果我按下$50 按钮,标签应该标题为The total amount raised so far is $60。我需要 3 个按钮,一个 $10, $20 和 $50。
我什至不知道从编码方面开始!
这是起始代码:
unit AIDSAWARENESS_U;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
Panel1: TPanel;
btn10: TButton;
btn50: TButton;
btn20: TButton;
lblOutput: TLabel;
private
{private declarations}
public
{public declarations}
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
end.
如果您不介意帮助我,将不胜感激!
【问题讨论】: