15.
: : , . , . ; ; . - . , , , . ListBox.
: ; , .
:
1. .
2. ( ).
3. . .
4. - .
5. , , , .
6. ListBox, .
:
80- , , , . , , , ( ), ().
. , , , , , . : , . , .
, , , . , . , . , . Delphi7.
, , , , : .
. , Boolean. True, , False, .
|
|
. , , Boolean, . 23.1 .
23.1.
= < > > < >= <= |
or, and , .
X>5
(I>=1) and (I<=10)
(a+5< >b) or BoolFunc
Alf=3
, . , in ( ), , :
X:=[2,4,6,8,10];
2 in X True.
5 in X False.
, . , (I>=1) and (I<=10) in: I in [1..10].
.
if then
:
if then ;
if () then () .
, True. . , , begin/end, .
if then else
, . :
if
then _1
else _2;
_1 , ( True), _2 , .
if X>0 then X:=-1 else X:=+1;
: else () .
, , , :
if X=1 then :=1 else
if X=2 then :=2 else
if (X=3) or (X=4) then :=3 else
if X=5 then :=4 else
if ( X=1) or (X in [8..100]) then :=5
else a:=0;
. case, .
case of
-_1: _1;
-_n: _n;
else _n+1;
end;
: , , . , . , . , ( , begin/end), . , , , else ( ), , else .
|
|
- , . Delphi - .
, ().
, , , , .
, . .
, , . , , .
:
;
.
, .
- , . . , .
. , , .
:
:= ();
:
- , , ;
- , ;
- , . .
, :
, , , ;
.
:
function (1: 1,..., : ): ;
Var
//
Begin
//
:= ;
end;
:
function - Delphi, , , ;
- . ;
- , . , , var, . ;
- , .
, , , , . , , , .
- . :
|
|
. , ;
. , , , - .
:
procedure (var 1: 1;... var : );
Var
//
Begin
//
end;
:
procedure - Delphi, , ;
- , ;
- , , . var . , , .
, .
implementation, , .
:
();
:
- ;
- .
, , , .
Pascal - (records). Delphi, - , . - , , , , - .
:
TPerson = class
Private
fname: string[15]; faddress: string[35];
Public
procedure Show;
end;
, .
TPerson - , fname faddress - , show - .
Delphi , f ( field - ). |
(type).
class, ( ), , , , , . , , . . (, ), , , . . .
, , . . (^, @) . , , .
|
|
, . , , , (, ). , , . , , , , , .
, . (, ), . , ( ) , .
. , - ( ) ǻ ǻ, ( , ; , ), , . . , ǻ ǻ , , : - ( ), - .
, ǻ, , , : , ǻ. , . , ǻ, , .
, , Delphi, . () , . , , , .
, , . , , . , . . , . .
- , Delphi ( ), Windows . Delphi, , .
( , ) . , , . ,
|
|
professor. Show;
Show professor. - .
, , , , , : , , . .
. : , .
. , , , , .
Delphi
Delphi , , ( , . .).
Delphi . Delphi , :
Type
TForm1 = class (TForm)
Private
{ Private declarations}
Public
{Public declarations}
end;
Var
Form1: TForm1;
, - .
, , , Delphi . , Delphi .
() , . ( TTimer) .
ListBox
ListBox (Standard). , , , . 23.2 ListBox.
23.2. ListBox
Name | . |
Items | |
ItemIndex | . |
Left | |
Top | |
Height | |
Width | |
Font | , |
Parent-Font |
Items ItemIndex. Items .
ItemIndex . , .
.
(Object Inspector) Items (.23.1).
(String List Editor) (.23.2) , . <Enter>. <Enter> . , .
English | |||
(Project File) | |||
(Resource File) | |||
Құ | (Constructor) | ||
( ) | Class | ||
Component | |||
(Object Inspector) | |||
Program | |||
Ә | (Method) | ||
(Unit) | |||
ұ | (Inheritance) | ||
() | (Object) | ||
(Component Palette) | |||
Ө | (Field) | ||
Қ | (Application) | ||
Қ | (Property) | ||
қ қң | (Run-Time Type) | ||
(Form) | |||
( ө) | interface | ||
Compiling | |||
Operator | |||
( ө/ ) | rocedure | ||
, | Private | ||
() | , | Impelementation | |
Project | |||
қғ | Event |
:
1. . . . Delphi7. , 2006.
2. .. , .. . . -, 2005.
3. .. Delphi. -, 2005.
4. .. Delphi . -, 2005.
5. .. , .. . . , 2005.
:
1. (if).
2. (case).
3. ?
4. ?
5. ?
6. ?
7. ?
8. ?
9. ?
10. ?
11. : , , .
12. ?
13. ?
14. ?
15. ?
16. ListBox?
17. Items ListBox?
18. ItemIndex ListBox.