책으로 델파이란 프로그램을 처음 접하는 사람입니다.
지금 예제의 소스를 입력해서 사용했는데요..
뭐가 문제인지.. 뭔가 선언이 안되었는데..
어떻게 선언을 하는지 몰라서..
아시는분 답변 부탁드립니다.
unit ushell;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, FileCtrl, StdCtrls, Buttons, ExtCtrls, ComCtrls, Grids;
type
TForm1 = class(TForm)
PageControl1: TPageControl;
TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
Panel1: TPanel;
Panel2: TPanel;
BtnRun: TButton;
BtnClose: TButton;
BBtnDelete: TBitBtn;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
FilterComboBox1: TFilterComboBox;
DriveComboBox1: TDriveComboBox;
DirectoryListBox1: TDirectoryListBox;
FileListBox1: TFileListBox;
Panel3: TPanel;
Panel4: TPanel;
Panel5: TPanel;
SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton;
FontDialog1: TFontDialog;
ColorDialog1: TColorDialog;
RadioGroup1: TRadioGroup;
Panel6: TPanel;
StringGrid1: TStringGrid;
BBtnClose: TBitBtn;
BtnInput: TButton;
procedure BtnRunClick(Sender: TObject);
procedure BBtnDeleteClick(Sender: TObject);
procedure BtnCloseClick(Sender: TObject);
procedure SpeedButton2Click(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure RadioGroup1Click(Sender: TObject);
procedure BtnInputClick(Sender: TObject);
procedure BBtnCloseClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.BtnRunClick(Sender: TObject);
var
Str:array [0..100] of Char;
begin
StrPcopy(Str, FilelistBox1.FileName);
WinExec(Str,SW_SHOWNORMAL);
end;
procedure TForm1.BBtnDeleteClick(Sender: TObject);
begin
With FileListBox1 do
if MessageDlg('Delete'+FileName+'?',mtConFirmation,
[mbYes,mbCancel],0)=mrYes then
if DeleteFile(FileName) then Update;
end;
procedure TForm1.BtnCloseClick(Sender: TObject);
begin
Close;
end;
procedure TForm1.SpeedButton2Click(Sender: TObject);
begin
if ColorDialog1.Execute then
Panel6.Color:=ColorDialog1.Color;
end;
procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
if FontDialog1.Execute then
Panel6.Font:=FontDialog1.Font;
end;
procedure TForm1.RadioGroup1Click(Sender: TObject);
begin
{'숨김'}
if RadioGroup1.ItemIndex=0 then
Panel6.Hide;
{'원 위치'}
if RadioGroup1.ItemIndex=1 then
begin
Panel6.Show;
Panel6.DockSite:=False;
Panel6.DragKind:=dkDrag;
Panel6.DragMode:=dmManual;
end;
//'Dock site'
if RadioGroup1.ItemIndex=2 then
begin
Panel6.DockSite:=true;
Panel6.DragKind:=dkDock;
Panel6.DragMode:=dmAutomatic;
end;
end;
procedure TForm1.BtnInputClick(Sender: TObject);
var
i,j,Count:Integer;
MunJaYul:String;
begin
Count:=1;
With StringGrid1 do
for i:=0 to RowCount-1 do
for j:=0 to ColCount-1 do
begin
RowHeight[i]:=30; //cell 높이 조정
ColWidths[j]:=120; //cell 폭 조정
Inc(Count); //Count 증가
MunJaYul:='델파이 프로그래밍' + IntToStr(Count);
Cells[i,j]:=MunJaYul; //각 셀에 문자열 + Count 삽입
end;
end;
procedure TForm1.BBtnCloseClick(Sender: TObject);
begin
Close;
end;
end.
위에서 Cell 부분 설정하는곳에서 에러가 발생합니다.
[Error] ushell.pas(128): Undeclared identifier: 'RowHeight'
이렇게 말이죠.. 뭔가를 선언해야 하는듯 한데. 어떻게 선언해야 할지몰라서.
그럼 부탁드립니다.
|