File I/O problems?
[ Delphi
Forum ] [ Delphi Tutorials -- by DelphiLand ]
Posted by El+p12333 on June 25, 2003 at 03:15:48:
Hi, I have a simple application that has a bunch of GroupBoxes and Checkboxes within the GroupBoxes. The way it is supposed to work is if a checkbox within a groupbox is checked then print to a file something. I have the code below. Please help. Thanks unit RangeTest; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TFormRangeSelectorTest = class(TForm) ButtonGenPlot: TButton; NFETRange: TGroupBox; PFETRange: TGroupBox; SiCrRange: TGroupBox; TempRange: TGroupBox; Edit1: TEdit; ButtonParseCirFile: TButton; ButtonShowFileName: TButton; ButtonGenRunFiles: TButton; LabelBaseCirFile: TLabel; ButtonClose: TButton; CheckBoxSlowN: TCheckBox; CheckBoxTypicalN: TCheckBox; CheckBoxFastN: TCheckBox; CheckBoxSlowP: TCheckBox; CheckBoxTypicalP: TCheckBox; CheckBoxFastP: TCheckBox; CheckBoxSlowSiCr: TCheckBox; CheckBoxTypicalSiCr: TCheckBox; CheckBoxFastSiCr: TCheckBox; EditTmin: TEdit; EditTstep: TEdit; EditTmax: TEdit; ButtonCalcTempRange: TButton; LabelTmin: TLabel; LabelTstep: TLabel; LabelTmax: TLabel; LabelNfet: TLabel; LabelPfet: TLabel; LabelSicr: TLabel; LabelNfetValue: TLabel; procedure ButtonCloseClick(Sender: TObject); procedure NFETRangeClick(Sender: TObject); private { Private declarations } public { Public declarations } end; var FormRangeSelectorTest: TFormRangeSelectorTest; implementation {$R *.dfm} procedure TFormRangeSelectorTest.ButtonCloseClick(Sender: TObject); begin Close; end; procedure TFormRangeSelectorTest.NFETRangeClick(Sender: TObject); var NFile:TextFile;
begin AssignFile(NFile,'C:\Proj\Delphi\delphi6\RangeSelTest\Run0.cir'); Rewrite(NFile);
if
CheckBoxTypicalN.Checked then begin
writeln(Nfile,'.PARAM Ncorner=0');
LabelNfetValue.Caption:=IntToStr(0);
end;
CloseFile(NFile); end; end.
Related Articles and Replies:
[ Delphi
Forum ]
[ DelphiLand: free Delphi source code, tips, tutorials ]
|