home *** CD-ROM | disk | FTP | other *** search
- unit pCalDemo;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, StdCtrls, Buttons, pscal;
-
- type
- TCalDemo = class(TForm)
- PopCal1: TPopCal;
- Edit1: TEdit;
- SpeedButton1: TSpeedButton;
- Label1: TLabel;
- CheckBox1: TCheckBox;
- procedure SpeedButton1Click(Sender: TObject);
- procedure CheckBox1Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- CalDemo: TCalDemo;
-
- implementation
-
- {$R *.DFM}
-
- procedure TCalDemo.SpeedButton1Click(Sender: TObject);
- var
- calleft : integer;
- caltop : integer;
- begin
- calleft := caldemo.left + speedbutton1.left;
- caltop := caldemo.top + speedbutton1.top;
- Popcal1.left := calleft;
- Popcal1.top := caltop;
- PopCal1.Format := 'mm/dd/yy';
- if checkbox1.checked = true then
- PopCal1.Format := 'dddddd'
- else
- PopCal1.Format := 'mm/dd/yy';
- PopCal1.GetDate;
- edit1.text := Popcal1.dateselected;
- end;
-
- procedure TCalDemo.CheckBox1Click(Sender: TObject);
- begin
- If Checkbox1.Checked = true then
- Popcal1.Format := 'dddddd'
- else
- Popcal1.Format := 'mm/dd/yy';
- end;
-
- end.
-