Стартовый пул
This commit is contained in:
132
bgracontrols/test/test_bgracustomdrawn/test_bgracustomdrawn.lpi
Normal file
132
bgracontrols/test/test_bgracustomdrawn/test_bgracustomdrawn.lpi
Normal file
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="10"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="BGRA Custom Drawn"/>
|
||||
<Scaled Value="True"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
</General>
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<BuildModes Count="2">
|
||||
<Item1 Name="Release" Default="True"/>
|
||||
<Item2 Name="Debug">
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="test_bgracustomdrawn"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<IncludeAssertionCode Value="True"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<CodeGeneration>
|
||||
<Checks>
|
||||
<IOChecks Value="True"/>
|
||||
<RangeChecks Value="True"/>
|
||||
<OverflowChecks Value="True"/>
|
||||
<StackChecks Value="True"/>
|
||||
</Checks>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<DebugInfoType Value="dsDwarf2Set"/>
|
||||
<UseHeaptrc Value="True"/>
|
||||
<UseExternalDbgSyms Value="True"/>
|
||||
</Debugging>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
</Item2>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="bgracontrols"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="test_bgracustomdrawn.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="umain.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="frmMain"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="test_bgracustomdrawn"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<SmartLinkUnit Value="True"/>
|
||||
<Optimizations>
|
||||
<OptimizationLevel Value="3"/>
|
||||
</Optimizations>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<GenerateDebugInfo Value="False"/>
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
@@ -0,0 +1,23 @@
|
||||
program test_bgracustomdrawn;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, umain
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
Application.Scaled:=True;
|
||||
Application.Title:='BGRA Custom Drawn';
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TfrmMain, frmMain);
|
||||
Application.Run;
|
||||
end.
|
||||
|
293
bgracontrols/test/test_bgracustomdrawn/umain.lfm
Normal file
293
bgracontrols/test/test_bgracustomdrawn/umain.lfm
Normal file
@@ -0,0 +1,293 @@
|
||||
object frmMain: TfrmMain
|
||||
Left = 474
|
||||
Height = 300
|
||||
Top = 178
|
||||
Width = 400
|
||||
AutoSize = True
|
||||
Caption = 'BGRA Custom Drawn'
|
||||
ClientHeight = 300
|
||||
ClientWidth = 400
|
||||
DesignTimePPI = 120
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '1.9.0.0'
|
||||
object BCPanel1: TBCPanel
|
||||
Left = 0
|
||||
Height = 276
|
||||
Top = 24
|
||||
Width = 400
|
||||
Align = alClient
|
||||
Background.Color = 5460819
|
||||
Background.ColorOpacity = 255
|
||||
Background.Gradient1.StartColor = 15722194
|
||||
Background.Gradient1.StartColorOpacity = 255
|
||||
Background.Gradient1.DrawMode = dmSet
|
||||
Background.Gradient1.EndColor = 13137169
|
||||
Background.Gradient1.EndColorOpacity = 255
|
||||
Background.Gradient1.ColorCorrection = True
|
||||
Background.Gradient1.GradientType = gtLinear
|
||||
Background.Gradient1.Point1XPercent = 0
|
||||
Background.Gradient1.Point1YPercent = 0
|
||||
Background.Gradient1.Point2XPercent = 0
|
||||
Background.Gradient1.Point2YPercent = 100
|
||||
Background.Gradient1.Sinus = False
|
||||
Background.Gradient2.StartColor = 15722194
|
||||
Background.Gradient2.StartColorOpacity = 255
|
||||
Background.Gradient2.DrawMode = dmSet
|
||||
Background.Gradient2.EndColor = 13137169
|
||||
Background.Gradient2.EndColorOpacity = 255
|
||||
Background.Gradient2.ColorCorrection = True
|
||||
Background.Gradient2.GradientType = gtLinear
|
||||
Background.Gradient2.Point1XPercent = 0
|
||||
Background.Gradient2.Point1YPercent = 0
|
||||
Background.Gradient2.Point2XPercent = 0
|
||||
Background.Gradient2.Point2YPercent = 100
|
||||
Background.Gradient2.Sinus = False
|
||||
Background.Gradient1EndPercent = 35
|
||||
Background.Style = bbsColor
|
||||
BevelInner = bvNone
|
||||
BevelOuter = bvNone
|
||||
BevelWidth = 1
|
||||
Border.Color = clBlack
|
||||
Border.ColorOpacity = 255
|
||||
Border.LightColor = clWhite
|
||||
Border.LightOpacity = 255
|
||||
Border.LightWidth = 0
|
||||
Border.Style = bboNone
|
||||
Border.Width = 1
|
||||
FontEx.Color = clDefault
|
||||
FontEx.EndEllipsis = False
|
||||
FontEx.FontQuality = fqSystemClearType
|
||||
FontEx.Height = 0
|
||||
FontEx.SingleLine = True
|
||||
FontEx.Shadow = False
|
||||
FontEx.ShadowColor = clBlack
|
||||
FontEx.ShadowColorOpacity = 255
|
||||
FontEx.ShadowRadius = 5
|
||||
FontEx.ShadowOffsetX = 5
|
||||
FontEx.ShadowOffsetY = 5
|
||||
FontEx.Style = []
|
||||
FontEx.TextAlignment = bcaCenter
|
||||
FontEx.WordBreak = False
|
||||
Rounding.RoundX = 1
|
||||
Rounding.RoundY = 1
|
||||
Rounding.RoundOptions = []
|
||||
TabOrder = 0
|
||||
object BCDButton1: TBCDButton
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 8
|
||||
Width = 96
|
||||
Caption = 'BCDButton1'
|
||||
DrawStyle = dsDefault
|
||||
OnClick = BCDButton1Click
|
||||
TabOrder = 0
|
||||
TabStop = True
|
||||
end
|
||||
object BCDButton2: TBCDButton
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 40
|
||||
Width = 96
|
||||
Caption = 'BCDButton2'
|
||||
DrawStyle = dsDefault
|
||||
Enabled = False
|
||||
TabOrder = 1
|
||||
TabStop = True
|
||||
end
|
||||
object BCDEdit1: TBCDEdit
|
||||
Left = 112
|
||||
Height = 25
|
||||
Top = 8
|
||||
Width = 80
|
||||
DrawStyle = dsDefault
|
||||
Lines.Strings = (
|
||||
'BCDEdit1'
|
||||
)
|
||||
end
|
||||
object BCDEdit2: TBCDEdit
|
||||
Left = 112
|
||||
Height = 25
|
||||
Top = 40
|
||||
Width = 80
|
||||
DrawStyle = dsDefault
|
||||
Enabled = False
|
||||
Lines.Strings = (
|
||||
'BCDEdit1'
|
||||
)
|
||||
end
|
||||
object BCDStaticText1: TBCDStaticText
|
||||
Left = 8
|
||||
Height = 20
|
||||
Top = 72
|
||||
Width = 106
|
||||
Caption = 'BCDStaticText1'
|
||||
DrawStyle = dsDefault
|
||||
end
|
||||
object BCDStaticText2: TBCDStaticText
|
||||
Left = 8
|
||||
Height = 20
|
||||
Top = 96
|
||||
Width = 106
|
||||
Caption = 'BCDStaticText2'
|
||||
DrawStyle = dsDefault
|
||||
Enabled = False
|
||||
end
|
||||
object BCDProgressBar1: TBCDProgressBar
|
||||
Left = 8
|
||||
Height = 20
|
||||
Top = 120
|
||||
Width = 100
|
||||
BarShowText = False
|
||||
Color = 14852966
|
||||
DrawStyle = dsDefault
|
||||
Max = 100
|
||||
Orientation = pbHorizontal
|
||||
Position = 0
|
||||
Smooth = False
|
||||
Style = pbstNormal
|
||||
end
|
||||
object BCDSpinEdit1: TBCDSpinEdit
|
||||
Left = 200
|
||||
Height = 25
|
||||
Top = 8
|
||||
Width = 80
|
||||
DrawStyle = dsDefault
|
||||
Lines.Strings = (
|
||||
'1'
|
||||
)
|
||||
Increment = 1
|
||||
MinValue = 0
|
||||
MaxValue = 100
|
||||
Value = 1
|
||||
end
|
||||
object BCDCheckBox1: TBCDCheckBox
|
||||
Left = 8
|
||||
Height = 20
|
||||
Top = 152
|
||||
Width = 123
|
||||
DrawStyle = dsDefault
|
||||
Caption = 'BCDCheckBox1'
|
||||
end
|
||||
object BCDCheckBox2: TBCDCheckBox
|
||||
Left = 8
|
||||
Height = 20
|
||||
Top = 176
|
||||
Width = 123
|
||||
AllowGrayed = True
|
||||
DrawStyle = dsDefault
|
||||
Caption = 'BCDCheckBox2'
|
||||
end
|
||||
object BCDCheckBox3: TBCDCheckBox
|
||||
Left = 136
|
||||
Height = 20
|
||||
Top = 152
|
||||
Width = 123
|
||||
DrawStyle = dsDefault
|
||||
Caption = 'BCDCheckBox3'
|
||||
Enabled = False
|
||||
end
|
||||
object BCDCheckBox4: TBCDCheckBox
|
||||
Left = 136
|
||||
Height = 20
|
||||
Top = 176
|
||||
Width = 123
|
||||
AllowGrayed = True
|
||||
DrawStyle = dsDefault
|
||||
Caption = 'BCDCheckBox4'
|
||||
Enabled = False
|
||||
end
|
||||
object BCDSpinEdit2: TBCDSpinEdit
|
||||
Left = 200
|
||||
Height = 25
|
||||
Top = 40
|
||||
Width = 80
|
||||
DrawStyle = dsDefault
|
||||
Enabled = False
|
||||
Lines.Strings = (
|
||||
'1'
|
||||
)
|
||||
Increment = 1
|
||||
MinValue = 0
|
||||
MaxValue = 100
|
||||
Value = 1
|
||||
end
|
||||
object BCDRadioButton1: TBCDRadioButton
|
||||
Left = 8
|
||||
Height = 20
|
||||
Top = 200
|
||||
Width = 142
|
||||
Caption = 'BCDRadioButton1'
|
||||
Checked = True
|
||||
DrawStyle = dsDefault
|
||||
end
|
||||
object BCDRadioButton2: TBCDRadioButton
|
||||
Left = 8
|
||||
Height = 20
|
||||
Top = 224
|
||||
Width = 142
|
||||
Caption = 'BCDRadioButton2'
|
||||
Checked = True
|
||||
DrawStyle = dsDefault
|
||||
end
|
||||
object BCDRadioButton3: TBCDRadioButton
|
||||
Left = 152
|
||||
Height = 20
|
||||
Top = 200
|
||||
Width = 142
|
||||
Caption = 'BCDRadioButton3'
|
||||
Checked = True
|
||||
DrawStyle = dsDefault
|
||||
Enabled = False
|
||||
end
|
||||
object BCDRadioButton4: TBCDRadioButton
|
||||
Left = 152
|
||||
Height = 20
|
||||
Top = 224
|
||||
Width = 142
|
||||
Caption = 'BCDRadioButton4'
|
||||
Checked = True
|
||||
DrawStyle = dsDefault
|
||||
Enabled = False
|
||||
end
|
||||
end
|
||||
object BCToolBar1: TBCToolBar
|
||||
Left = 0
|
||||
Height = 24
|
||||
Top = 0
|
||||
Width = 400
|
||||
AutoSize = True
|
||||
Caption = 'BCToolBar1'
|
||||
ShowCaptions = True
|
||||
TabOrder = 1
|
||||
OnPaintButton = BCToolBar1PaintButton
|
||||
OnRedraw = BCToolBar1Redraw
|
||||
LimitMemoryUsage = False
|
||||
object ToolButton1: TToolButton
|
||||
Left = 1
|
||||
Top = 2
|
||||
Caption = 'ToolButton1'
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 91
|
||||
Top = 2
|
||||
Caption = 'ToolButton2'
|
||||
Enabled = False
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 181
|
||||
Top = 2
|
||||
Caption = 'ToolButton3'
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 271
|
||||
Top = 2
|
||||
Caption = 'ToolButton4'
|
||||
end
|
||||
end
|
||||
object Timer1: TTimer
|
||||
Interval = 100
|
||||
OnTimer = Timer1Timer
|
||||
Left = 233
|
||||
Top = 118
|
||||
end
|
||||
end
|
180
bgracontrols/test/test_bgracustomdrawn/umain.pas
Normal file
180
bgracontrols/test/test_bgracustomdrawn/umain.pas
Normal file
@@ -0,0 +1,180 @@
|
||||
unit umain;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Forms, Controls, Graphics, ExtCtrls, ComCtrls, Types,
|
||||
{ BGRABitmap }
|
||||
BGRABitmap, BGRABitmapTypes,
|
||||
{ BGRAControls }
|
||||
BGRACustomDrawn, BCPanel, BCToolBar, Classes;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmMain }
|
||||
|
||||
TfrmMain = class(TForm)
|
||||
BCDButton1: TBCDButton;
|
||||
BCDButton2: TBCDButton;
|
||||
BCDCheckBox3: TBCDCheckBox;
|
||||
BCDCheckBox4: TBCDCheckBox;
|
||||
BCDEdit1: TBCDEdit;
|
||||
BCDEdit2: TBCDEdit;
|
||||
BCDProgressBar1: TBCDProgressBar;
|
||||
BCDRadioButton1: TBCDRadioButton;
|
||||
BCDRadioButton2: TBCDRadioButton;
|
||||
BCDRadioButton3: TBCDRadioButton;
|
||||
BCDRadioButton4: TBCDRadioButton;
|
||||
BCDSpinEdit1: TBCDSpinEdit;
|
||||
BCDSpinEdit2: TBCDSpinEdit;
|
||||
BCDStaticText1: TBCDStaticText;
|
||||
BCDStaticText2: TBCDStaticText;
|
||||
BCPanel1: TBCPanel;
|
||||
BCToolBar1: TBCToolBar;
|
||||
BCDCheckBox1: TBCDCheckBox;
|
||||
BCDCheckBox2: TBCDCheckBox;
|
||||
Timer1: TTimer;
|
||||
ToolButton1: TToolButton;
|
||||
ToolButton2: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
ToolButton4: TToolButton;
|
||||
procedure BCDButton1Click(Sender: TObject);
|
||||
procedure BCToolBar1PaintButton(Sender: TToolButton; State: integer);
|
||||
procedure BCToolBar1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure Timer1Timer(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
{ public declarations }
|
||||
procedure AutoAdjustLayout(AMode: TLayoutAdjustmentPolicy;
|
||||
const AFromDPI, AToDPI, AOldFormWidth, ANewFormWidth: integer); override;
|
||||
end;
|
||||
|
||||
var
|
||||
frmMain: TfrmMain;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TfrmMain }
|
||||
|
||||
procedure TfrmMain.FormCreate(Sender: TObject);
|
||||
begin
|
||||
//Self.AutoAdjustLayout(lapAutoAdjustForDPI, Self.DesignTimeDPI,
|
||||
// Screen.PixelsPerInch, Self.Width, ScaleX(Self.Width, Self.DesignTimeDPI));
|
||||
end;
|
||||
|
||||
procedure TfrmMain.BCToolBar1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
|
||||
begin
|
||||
Bitmap.Rectangle(0, 0, Bitmap.Width, Bitmap.Height, BGRA(83, 83, 83),
|
||||
BGRA(83, 83, 83), dmSet);
|
||||
Bitmap.SetHorizLine(0, Bitmap.Height - 2, Bitmap.Width - 1, BGRA(106, 106, 106));
|
||||
Bitmap.SetHorizLine(0, Bitmap.Height - 1, Bitmap.Width - 1, BGRA(40, 40, 40));
|
||||
end;
|
||||
|
||||
procedure TfrmMain.BCToolBar1PaintButton(Sender: TToolButton; State: integer);
|
||||
var
|
||||
Bitmap: TBGRABitmap;
|
||||
ts: TSize;
|
||||
begin
|
||||
Bitmap := TBGRABitmap.Create(Sender.Width, Sender.Height);
|
||||
|
||||
if Sender.Style = tbsButton then
|
||||
begin
|
||||
if Sender.Enabled then
|
||||
begin
|
||||
if State = 3 then
|
||||
begin
|
||||
{ Button Down }
|
||||
Bitmap.Rectangle(0, 0, Sender.Width, Sender.Height - 1, BGRA(48, 48, 48),
|
||||
BGRA(61, 61, 61), dmSet);
|
||||
Bitmap.Rectangle(1, 1, Sender.Width - 1, Sender.Height - 2, BGRA(55, 55, 55),
|
||||
BGRA(61, 61, 61), dmSet);
|
||||
Bitmap.SetHorizLine(0, Sender.Height - 1, Sender.Width - 1, BGRA(83, 83, 83));
|
||||
end
|
||||
else
|
||||
begin
|
||||
if State = 2 then
|
||||
begin
|
||||
{ Button Hovered }
|
||||
Bitmap.GradientFill(0, 0, Sender.Width, Sender.Height, BGRA(132, 132, 132),
|
||||
BGRA(109, 109, 109), gtLinear, PointF(0, 0),
|
||||
PointF(0, Sender.Height), dmSet);
|
||||
Bitmap.Rectangle(0, 0, Sender.Width, Sender.Height - 1,
|
||||
BGRA(48, 48, 48), dmSet);
|
||||
Bitmap.SetHorizLine(1, 1, Sender.Width - 2, BGRA(160, 160, 160));
|
||||
Bitmap.SetHorizLine(0, Sender.Height - 1, Sender.Width - 1, BGRA(83, 83, 83));
|
||||
end
|
||||
else
|
||||
{ Button Normal }
|
||||
Bitmap.Fill(BGRA(83, 83, 83));
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
{ Button Disabled }
|
||||
Bitmap.Rectangle(0, 0, Sender.Width, Sender.Height - 1, BGRA(66, 66, 66),
|
||||
BGRA(71, 71, 71), dmSet);
|
||||
Bitmap.SetHorizLine(0, Sender.Height - 1, Sender.Width - 1, BGRA(83, 83, 83));
|
||||
end;
|
||||
|
||||
Bitmap.FontName := Sender.Font.Name;
|
||||
Bitmap.FontStyle := Sender.Font.Style;
|
||||
Bitmap.FontHeight := Sender.Font.Height;
|
||||
Bitmap.FontQuality := fqSystemClearType;
|
||||
ts := Bitmap.TextSize(Sender.Caption);
|
||||
|
||||
if Sender.Enabled then
|
||||
begin
|
||||
{ Text Enabled }
|
||||
Bitmap.TextOut((Sender.Width - ts.cx) div 2, ((Sender.Height - ts.cy) div 2) -
|
||||
1, Sender.Caption, BGRA(47, 47, 47));
|
||||
Bitmap.TextOut((Sender.Width - ts.cx) div 2, (Sender.Height - ts.cy) div 2,
|
||||
Sender.Caption, BGRA(229, 229, 229));
|
||||
end
|
||||
else
|
||||
{ Text Disabled }
|
||||
Bitmap.TextOut((Sender.Width - ts.cx) div 2, (Sender.Height - ts.cy) div 2,
|
||||
Sender.Caption, BGRA(170, 170, 170));
|
||||
end;
|
||||
|
||||
Bitmap.Draw(Sender.Canvas, 0, 0, True);
|
||||
Bitmap.Free;
|
||||
end;
|
||||
|
||||
procedure TfrmMain.BCDButton1Click(Sender: TObject);
|
||||
begin
|
||||
BCDButton2.Enabled := not BCDButton2.Enabled;
|
||||
BCDEdit2.Enabled := not BCDEdit2.Enabled;
|
||||
BCDSpinEdit2.Enabled := not BCDSpinEdit2.Enabled;
|
||||
BCDStaticText2.Enabled := not BCDStaticText2.Enabled;
|
||||
BCDCheckBox3.Enabled := not BCDCheckBox3.Enabled;
|
||||
BCDCheckBox4.Enabled := not BCDCheckBox4.Enabled;
|
||||
BCDRadioButton3.Enabled := not BCDRadioButton3.Enabled;
|
||||
BCDRadioButton4.Enabled := not BCDRadioButton4.Enabled;
|
||||
end;
|
||||
|
||||
procedure TfrmMain.Timer1Timer(Sender: TObject);
|
||||
begin
|
||||
if BCDProgressBar1.Position <> BCDProgressBar1.Max then
|
||||
BCDProgressBar1.Position := BCDProgressBar1.Position + 1
|
||||
else
|
||||
Timer1.Enabled := False;
|
||||
end;
|
||||
|
||||
procedure TfrmMain.AutoAdjustLayout(AMode: TLayoutAdjustmentPolicy;
|
||||
const AFromDPI, AToDPI, AOldFormWidth, ANewFormWidth: integer);
|
||||
begin
|
||||
inherited AutoAdjustLayout(AMode, AFromDPI, AToDPI, AOldFormWidth,
|
||||
ANewFormWidth);
|
||||
|
||||
//BCToolBar1.ButtonWidth := ScaleX(BCToolBar1.ButtonWidth, Self.DesignTimeDPI);
|
||||
//BCToolBar1.ButtonHeight := ScaleY(BCToolBar1.ButtonHeight, Self.DesignTimeDPI);
|
||||
BCToolBar1.Height := BCToolBar1.ButtonHeight + 4;
|
||||
end;
|
||||
|
||||
end.
|
Reference in New Issue
Block a user