Delphi Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
델파이 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
FreePascal/Lazarus
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
델마당
볼랜드포럼 광고 모집

델파이 Q&A
Delphi Programming Q&A
[12630] 이 소스에 문제점좀 찾아주세요 ㅠ
후아힝 [nooo21] 1398 읽음    2009-04-20 23:03
procedure TForm1.FormCreate(Sender: TObject);
begin

StringGrid1.Cells[0,0]:='코드' ;
StringGrid1.Cells[1,0]:='학과' ;
StringGrid1.Cells[2,0]:='학번' ;
StringGrid1.Cells[3,0]:='이름' ;
StringGrid1.Cells[4,0]:='국어점수';
StringGrid1.Cells[5,0]:='영어점수';
StringGrid1.Cells[6,0]:='점수합계';
StringGrid1.Cells[7,0]:='점수평균';
StringGrid1.Cells[8,0]:='성별' ;
StringGrid1.Cells[9,0]:='번호' ;
end;

procedure TForm1.Button1Click(Sender: TObject);
var
cnt : integer;
s : String;
begin
cnt := 1;
s:=' ';



if ComboBox1.Text = '전자공학과' then
StringGrid1.Cells[0, cnt] := '01';
if ComboBox1.Text = '전기공학과' then
StringGrid1.Cells[0, cnt] := '02';
if ComboBox1.Text = '컴퓨터공학과' then
StringGrid1.Cells[0, cnt] := '03';

StringGrid1.Cells[1, cnt] := ComboBox1.Text;

StringGrid1.Cells[2, cnt] := Edit1.Text;
StringGrid1.Cells[3, cnt] := Edit2.Text;

if RadioGroup1.ItemIndex = 0 then
StringGrid1.Cells[4, cnt] := '남자';
if RadioGroup1.ItemIndex = 1 then
StringGrid1.Cells[4, cnt] := '여자';

StringGrid1.Cells[5, cnt] := Edit3.Text;
StringGrid1.Cells[6, cnt] := Edit4.Text;

StringGrid1.Cells[7, cnt] := intTostr(StrToint(Edit3.Text)+(StrToint(Edit4.Text)));
StringGrid1.Cells[8, cnt] := FloatTostr(StrToint(StringGrid1.Cells[7, cnt]) / 2 );


if CheckBox1.Checked = true then
S := S + '1'
else
S := S + '0';
if CheckBox2.Checked = true then
S := S + '1'
else
S := S + '0';
if CheckBox3.Checked = true then
S := S + '1'
else
S := S + '0';
if CheckBox4.Checked = true then
S := S + '1'
else
S := S + '0';
if CheckBox5.Checked = true then
S := S + '1'
else
S := S + '0';

StringGrid1.Cells[9, cnt] := s;
inc(cnt);


end;

end.


소스를 짯는데;
한칸씩 내려가지를 않습니다 ㅠㅠ
뭐가 잘못된건지좀 가르쳐 주세요 ㅠㅠ

+ -

관련 글 리스트
12630 이 소스에 문제점좀 찾아주세요 ㅠ 후아힝 1398 2009/04/20
12644     Re:이 소스에 문제점좀 찾아주세요 ㅠ seg 1575 2009/04/21
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.