unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, PngImageList, ImgList, ComCtrls, ToolWin, StdCtrls, ExtCtrls;
type
TPNG =
class(TForm)
ToolBar1: TToolBar;
tbtnAngel: TToolButton;
PngImageList1: TPngImageList;
tbtnRight: TToolButton;
tbtnPlus: TToolButton;
tbtnX: TToolButton;
btnGrey: TButton;
btnAlleEnable: TButton;
Panel1: TPanel;
procedure FormResize(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure btnAlleEnableClick(Sender: TObject);
procedure btnGreyClick(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
PNG: TPNG;
implementation
{$R *.dfm}
procedure TPNG.FormResize(Sender: TObject);
begin
Toolbar1.ShowCaptions := False;
Application.ProcessMessages;
Toolbar1.ShowCaptions := True;
end;
procedure TPNG.FormShow(Sender: TObject);
begin
tbtnAngel.Enabled := True;
tbtnRight.Enabled := True;
tbtnPlus.Enabled := True;
tbtnX.Enabled := True;
end;
procedure TPNG.btnAlleEnableClick(Sender: TObject);
begin
if (tbtnAngel.Enabled = True)
and (tbtnPlus.Enabled = True)
and
(tbtnX.Enabled = True)
and (tbtnRight.Enabled = True)
then
begin
tbtnAngel.Enabled := False;
tbtnPlus.Enabled := False;
tbtnX.Enabled := False;
tbtnRight.Enabled := False;
Toolbar1.ShowCaptions := False;
Application.ProcessMessages;
Toolbar1.ShowCaptions := True;
end
else
begin
tbtnAngel.Enabled := True;
tbtnPlus.Enabled := True;
tbtnX.Enabled := True;
tbtnRight.Enabled := True;
Toolbar1.ShowCaptions := False;
Application.ProcessMessages;
Toolbar1.ShowCaptions := True;
end;
end;
procedure TPNG.btnGreyClick(Sender: TObject);
begin
if PngImageList1.EnabledImages = True
then
begin
PngImageList1.EnabledImages := False;
Toolbar1.ShowCaptions := False;
Application.ProcessMessages;
Toolbar1.ShowCaptions := True;
end
else
begin
PngImageList1.EnabledImages := True;
Toolbar1.ShowCaptions := False;
Application.ProcessMessages;
Toolbar1.ShowCaptions := True;
end;
end;
end.