.


:




:

































 

 

 

 


. , ,

17.

1.

, , . , , CapsLock, NumLock, ScrollLock, , .

.

1) Delphi.

2) .

3) TLabel .

4) TToolBar.

5) ( Separator).

6) .

7) TImageList. .

8) TImageList TToolBar.

9) .

10) TPopulMenu : Green, Red, Blue, Black.

11) TPopulMenu (DropDownMenu= TPopulMenu)

12) :

:
procedure TForm1.ToolButton5Click(Sender: TObject); ( )

begin

close;

end;

 

ƻ:

procedure TForm1.ToolButton1MouseUp(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

begin

if ToolButton1.Down ( )

then Label1.Font.Style:=Label1.Font.Style+[fsBold]

else Label1.Font.Style:=Label1.Font.Style-[fsBold];

end;

:

procedure TForm1.ToolButton2MouseUp(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

begin

if ToolButton2.Down ( )

then Label1.Font.Style:=Label1.Font.Style+[fsItalic]

else Label1.Font.Style:=Label1.Font.Style-[fsItalic];

end;

:

procedure TForm1.ToolButton3MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); ( )

begin

case Label1.Font.Color of

clGreen:Label1.Font.Color:=clGreen;

clRed:Label1.Font.Color:=clRed;

clBlue:Label1.Font.Color:=clBlue;

clBlack:Label1.Font.Color:=clBlack;

end;

end;

:

procedure TForm1.Green1Click(Sender: TObject);

begin

Label1.Font.Color:=clGreen;

end;

 

procedure TForm1.Red1Click(Sender: TObject);

begin

label1.Font.Color:=clRed;

end;

 

procedure TForm1.Blue1Click(Sender: TObject);

begin

label1.Font.Color:=clBlue;

end;

 

procedure TForm1.Black1Click(Sender: TObject);

begin

label1.Font.Color:=clBlack;

end;

 

13) TStatusBar ( Win32).

14) Editor.

15) add (CapsLock, NumLock, ScrollLock, Time).

16) :

Alignment taCenter

Bevel pbLowered

Style psText

Width 85

Time:

Alignment taRightJustify

Bevel pbLowered

Style psText

Width 85

17) :

procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;

Shift: TShiftState);

begin

if Key=vk_Capital then

if StatusBar1.Panels[0].Bevel=pbRaised

then StatusBar1.Panels[0].Bevel:=pbLowered

else StatusBar1.Panels[0].Bevel:=pbRaised;

if Key=vk_NumLock then

if StatusBar1.Panels[1].Bevel=pbRaised

then StatusBar1.Panels[1].Bevel:=pbLowered

else StatusBar1.Panels[1].Bevel:=pbRaised;

if Key=vk_Scroll then

if StatusBar1.Panels[2].Bevel=pbRaised

then StatusBar1.Panels[2].Bevel:=pbLowered

else StatusBar1.Panels[2].Bevel:=pbRaised;

end;

18) System Timer .

19) Timer :

procedure TForm1.Timer1Timer(Sender: TObject);

begin

StatusBar1.Panels[3].Text:=TimeToStr(Now)+' ';

end;

20) .

 

 



<== | ==>
. | ,
:


: 2016-09-03; !; : 277 |


:

:

, .
==> ...

1525 - | 1360 -


© 2015-2024 lektsii.org - -

: 0.01 .