.


:




:

































 

 

 

 


- 25

23. Delphi

 

: : , , . StringGrid .

: Delphi 7, , StringGrid.

- 5

.

: , .

: - 45

1. : , , .

2. StringGrid, ( , cells).

3. .

- 10

: , .

:

ü ( , , );

ü ( : , );

- 50

: .

3

, :

. (.24.7).

 

24.7

 

: :

- StringGrid;

- for.

 

1. . .

2. 24.8.

 

24.8

 

3. , , Pr5.pas Project5.dpr .

4. , Alt+F4.

5. :

Label1 (Properties) Caption
Label2 (Properties) Caption
StringGrid1 (Properties) ColCount  
FixedCols  
RowCount  
DefaultRowHeight  
Height  
DefaultColWidth  
Width  
Options.goEditing True
Options.Always ShowEditor True
Options.goTabs True
BitBtn1 (Properties) Kind bkOK
Caption
(Events) OnClick for i:=1 to 5 do if length(StringGrid1.Cells[i-1,0]) <> 0 then a[i]:=StrToInt(StringGrid1.Cells[i-1,0]) else a[i]:=0; summ:=0; for i:=1 to 5 do summ:=summ+a[i]; sr:=summ/5; Label2.Caption:= ' :' + IntToStr(summ) + #13 + ' :' + FloatToStr(sr);

 

(BitBtn1) begin :

Var

a:array[1..5] of integer;

summ:integer;

sr:real;

i:integer;

 

6. , .

 

1. (BitBtn2).

2. Label2, StringGrid1 .

. BitBtn3. Kind bkRetry, Caption - &. .

for i:=1 to 5 do StringGrid1.Cells[i-1,0]:=' ';

Label2.Caption:=' ';

(BitBtn3) begin i:

Var

i:integer;

 

24.9

3. .

4. .

5. , 2-. , , 2-.

:

1. ; StringGrid, Label.

2. ; StringGrid, Label.

3. ; StringGrid, Label.

4. ; StringGrid, Label.

5. ( ).

6. 100 ( ).

7. (case).

8. (, , , ).

9. . , , .

10. 2.

1.

   
  .  
  Form1 .  
  .  
  ( Unit 1. Pas )  
  Var  
  (Events) .  
  ,  
  .  
  .  

 

:

1. . . . Delphi7. , 2006.

2. .. , .. . . -, 2005 .

3. .. Delphi -, 2005 .

4. .. Delphi . -, 2005 .

5. .. , .. . . , 2005 .

- 10

- 25

, , . . .

- 20

, . .

:

1. ?

2. ;

3. ?

4. length?

5. delete?

6. s?

7. ?

8. ?

9. ?

10. ?

11. ?

12. ?

13. ?

14. ?

15. ?

16. StringGrid?

17. Memo?

18. StringGrid: , ?

19. ?

20. ?

: . , Delphi

- - 5

,

, . ( ).

 



<== | ==>
|
:


: 2016-07-29; !; : 383 |


:

:

, ,
==> ...

774 - | 780 -


© 2015-2024 lektsii.org - -

: 0.025 .