15.
: : , . , . ; ; . - . , , , . ListBox.
: ; , .
- 5
, , .
: , .
: - 45
1. .
2. ( ).
3. . .
4. - .
5. , , , .
6. ListBox, .
- 10
: . . 185(1) 03.03.15. ooperation Learning. 411 20.04.2015. . 181 03.03.2015.
- 50
: .
1
, :
Enter. (.1).
1
: ListBox () (Standard), (String List Editor) ( Case), Image (Additional), .
: | ||
1. . | ||
. 1, 2. | ||
. 1, 2. | ||
- Unit 1. as | ||
(Events) (Object Inspector), , . 1, 2. | ||
. | ||
, . | ||
Form1. | ||
. | ||
, . | ||
. |
|
|
1. . .
2. 2.
2
3. , , Pr3.pas Project3.dpr
4. .
5. :
1
Image1 | (Properties) | Left | |
Top | |||
Height | |||
Width | |||
Picture | |||
Stretch | True | ||
ListBox1 | (Properties) | Height | |
Width | |||
Top | |||
Cursor | crHandPoint | ||
Label1 | (Properties) | Caption | |
AutoSize ( Caption) | False | ||
WordWrap ( ) | True | ||
Alignment ( ) | taCenter | ||
Height Width | . |
6. ListBox1, (Object Inspector) Items, . (.3) , .
Termin.txt. Save. OK.
3
7. :
2
ListBox1 | (Events) | OnKeyPress | If key=#13 then case ListBox1.ItemIndex of 0:Label1.Caption:=' () (), , '; 1:Label1.Caption:=' - , '; 2:Label1.Caption:=' , (, ..) . '; 3:Label1.Caption:=' - , , '; 4:Label1.Caption:=' (), , . .'; end; |
8. , .
1. : , .
2. , ListBox1, , (. 2 ).
3. .
2
.
: | ||
2. . | ||
. 1, 2. | ||
- Unit 1. as | ||
(Events) (Object Inspector), , . | ||
. | ||
, . | ||
Form1. | ||
, . |
:
|
|
- . .
- 1.
1
- , , Pr4.pas Project4.dpr
- .
5. :
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Edit1: TEdit;
Button1: TButton;
Button2: TButton;
BitBtn1: TBitBtn;
Label3: TLabel;
procedure Button1Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
P: integer;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
P:=StrToInt(Edit1.Text);
{If P<=60 Then Label2.Caption:=' - ';
If (P>=60)and(P<=80) Then Label2.Caption:=' ';
If P>80 Then Label2.Caption:=' - '; }
If P<=60 Then Label3.Caption:=' - ';
If (P>=60)and(P<=80) Then Label3.Caption:=' ';
If P>80 Then Label3.Caption:=' - ';
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
Close;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Edit1.Text:=' ';
Label3.Caption:=' ';
end;
end.
:
2
:
1. . . . Delphi7. , 2006.
2. .. , .. . . -, 2005 .
3. .. Delphi -, 2005 .
4. .. Delphi . -, 2005 .
5. .. , .. . . , 2005 .
- 10
: - 25
. .
- 20
. , 6 .
- 5
:
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.