Стартовый пул
This commit is contained in:
BIN
bgracontrols/test/test_mdbutton_tab/test.ico
Normal file
BIN
bgracontrols/test/test_mdbutton_tab/test.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
133
bgracontrols/test/test_mdbutton_tab/test.lpi
Normal file
133
bgracontrols/test/test_mdbutton_tab/test.lpi
Normal file
@@ -0,0 +1,133 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="test"/>
|
||||
<Scaled Value="True"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<BuildModes Count="2">
|
||||
<Item1 Name="Debug" Default="True"/>
|
||||
<Item2 Name="Release">
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="test"/>
|
||||
</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>
|
||||
</Item2>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="1">
|
||||
<Mode0 Name="default"/>
|
||||
</Modes>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="bgracontrols"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="test.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="umain.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="test"/>
|
||||
</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>
|
||||
<VerifyObjMethodCallValidity Value="True"/>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<DebugInfoType Value="dsDwarf2Set"/>
|
||||
<UseHeaptrc Value="True"/>
|
||||
<TrashVariables Value="True"/>
|
||||
<UseExternalDbgSyms Value="True"/>
|
||||
</Debugging>
|
||||
<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>
|
22
bgracontrols/test/test_mdbutton_tab/test.lpr
Normal file
22
bgracontrols/test/test_mdbutton_tab/test.lpr
Normal file
@@ -0,0 +1,22 @@
|
||||
program test;
|
||||
|
||||
{$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
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Scaled:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
309
bgracontrols/test/test_mdbutton_tab/umain.lfm
Normal file
309
bgracontrols/test/test_mdbutton_tab/umain.lfm
Normal file
@@ -0,0 +1,309 @@
|
||||
object Form1: TForm1
|
||||
Left = 438
|
||||
Height = 320
|
||||
Top = 174
|
||||
Width = 512
|
||||
Caption = 'Tabs'
|
||||
ClientHeight = 320
|
||||
ClientWidth = 512
|
||||
Color = clWhite
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '2.0.10.0'
|
||||
object PageControl1: TPageControl
|
||||
Left = 8
|
||||
Height = 255
|
||||
Top = 57
|
||||
Width = 496
|
||||
ActivePage = TabSheet1
|
||||
Align = alClient
|
||||
BorderSpacing.Around = 8
|
||||
ParentFont = False
|
||||
ShowTabs = False
|
||||
TabIndex = 0
|
||||
TabOrder = 0
|
||||
object TabSheet1: TTabSheet
|
||||
Caption = 'TabSheet1'
|
||||
ClientHeight = 247
|
||||
ClientWidth = 488
|
||||
ParentFont = False
|
||||
object BCMDButton4: TBCMDButton
|
||||
Left = 6
|
||||
Height = 25
|
||||
Top = 13
|
||||
Width = 101
|
||||
Animation = True
|
||||
StyleNormal.Color = clWhite
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Change to left'
|
||||
OnClick = BCMDButton4Click
|
||||
ParentFont = False
|
||||
end
|
||||
object BCMDButton10: TBCMDButton
|
||||
Left = 6
|
||||
Height = 25
|
||||
Top = 45
|
||||
Width = 102
|
||||
Animation = True
|
||||
StyleNormal.Color = clWhite
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Change to top'
|
||||
OnClick = BCMDButton10Click
|
||||
ParentFont = False
|
||||
end
|
||||
object BCMDButton11: TBCMDButton
|
||||
Left = 6
|
||||
Height = 25
|
||||
Top = 77
|
||||
Width = 109
|
||||
Animation = True
|
||||
StyleNormal.Color = clWhite
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Change to right'
|
||||
OnClick = BCMDButton11Click
|
||||
ParentFont = False
|
||||
end
|
||||
object BCMDButton12: TBCMDButton
|
||||
Left = 6
|
||||
Height = 25
|
||||
Top = 109
|
||||
Width = 124
|
||||
Animation = True
|
||||
StyleNormal.Color = clWhite
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Change to bottom'
|
||||
OnClick = BCMDButton12Click
|
||||
ParentFont = False
|
||||
end
|
||||
object BCMDButton13: TBCMDButton
|
||||
Left = 6
|
||||
Height = 25
|
||||
Top = 141
|
||||
Width = 100
|
||||
Animation = True
|
||||
StyleNormal.Color = clWhite
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
Checked = True
|
||||
Kind = mdbkCheckBox
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Animation'
|
||||
OnClick = BCMDButton13Click
|
||||
ParentFont = False
|
||||
end
|
||||
object ColorBox1: TColorBox
|
||||
Left = 168
|
||||
Height = 22
|
||||
Top = 40
|
||||
Width = 100
|
||||
Selected = clBlue
|
||||
ItemHeight = 16
|
||||
OnChange = ColorBox1Change
|
||||
TabOrder = 0
|
||||
end
|
||||
object StaticText1: TStaticText
|
||||
Left = 168
|
||||
Height = 16
|
||||
Top = 16
|
||||
Width = 89
|
||||
AutoSize = True
|
||||
Caption = 'CheckmarkColor'
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object TabSheet2: TTabSheet
|
||||
Caption = 'TabSheet2'
|
||||
ClientHeight = 312
|
||||
ClientWidth = 612
|
||||
ParentFont = False
|
||||
object BCMDButton5: TBCMDButton
|
||||
Left = 6
|
||||
Height = 30
|
||||
Top = 13
|
||||
Width = 139
|
||||
StyleNormal.Color = clWhite
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Hello from Page 2'
|
||||
ParentFont = False
|
||||
end
|
||||
end
|
||||
object TabSheet3: TTabSheet
|
||||
Caption = 'TabSheet3'
|
||||
ClientHeight = 312
|
||||
ClientWidth = 612
|
||||
ParentFont = False
|
||||
object BCMDButton6: TBCMDButton
|
||||
Left = 6
|
||||
Height = 30
|
||||
Top = 13
|
||||
Width = 139
|
||||
StyleNormal.Color = clWhite
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Hello from Page 3'
|
||||
ParentFont = False
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 8
|
||||
Height = 41
|
||||
Top = 8
|
||||
Width = 496
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 8
|
||||
BevelOuter = bvNone
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 3
|
||||
ClientHeight = 41
|
||||
ClientWidth = 496
|
||||
Color = clWhite
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
object BCMDButton7: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 0
|
||||
Height = 41
|
||||
Top = 0
|
||||
Width = 77
|
||||
Animation = True
|
||||
StyleNormal.Color = clWhite
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
Checked = True
|
||||
Kind = mdbkTab
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
BorderSpacing.InnerBorder = 16
|
||||
Caption = 'Page 1'
|
||||
OnClick = BCMDButton1Click
|
||||
ParentFont = False
|
||||
end
|
||||
object BCMDButton8: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 77
|
||||
Height = 41
|
||||
Top = 0
|
||||
Width = 77
|
||||
Animation = True
|
||||
StyleNormal.Color = clWhite
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
Kind = mdbkTab
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
BorderSpacing.InnerBorder = 16
|
||||
Caption = 'Page 2'
|
||||
OnClick = BCMDButton2Click
|
||||
ParentFont = False
|
||||
end
|
||||
object BCMDButton9: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 154
|
||||
Height = 41
|
||||
Top = 0
|
||||
Width = 77
|
||||
Animation = True
|
||||
StyleNormal.Color = clWhite
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
Kind = mdbkTab
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
BorderSpacing.InnerBorder = 16
|
||||
Caption = 'Page 3'
|
||||
OnClick = BCMDButton3Click
|
||||
ParentFont = False
|
||||
end
|
||||
end
|
||||
end
|
124
bgracontrols/test/test_mdbutton_tab/umain.pas
Normal file
124
bgracontrols/test/test_mdbutton_tab/umain.pas
Normal file
@@ -0,0 +1,124 @@
|
||||
unit umain;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, ComCtrls,
|
||||
ColorBox, StdCtrls, BCMDButton;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
BCMDButton10: TBCMDButton;
|
||||
BCMDButton11: TBCMDButton;
|
||||
BCMDButton12: TBCMDButton;
|
||||
BCMDButton13: TBCMDButton;
|
||||
BCMDButton4: TBCMDButton;
|
||||
BCMDButton5: TBCMDButton;
|
||||
BCMDButton6: TBCMDButton;
|
||||
BCMDButton7: TBCMDButton;
|
||||
BCMDButton8: TBCMDButton;
|
||||
BCMDButton9: TBCMDButton;
|
||||
ColorBox1: TColorBox;
|
||||
PageControl1: TPageControl;
|
||||
Panel2: TPanel;
|
||||
StaticText1: TStaticText;
|
||||
TabSheet1: TTabSheet;
|
||||
TabSheet2: TTabSheet;
|
||||
TabSheet3: TTabSheet;
|
||||
procedure ColorBox1Change(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure BCMDButton10Click(Sender: TObject);
|
||||
procedure BCMDButton11Click(Sender: TObject);
|
||||
procedure BCMDButton12Click(Sender: TObject);
|
||||
procedure BCMDButton13Click(Sender: TObject);
|
||||
procedure BCMDButton1Click(Sender: TObject);
|
||||
procedure BCMDButton2Click(Sender: TObject);
|
||||
procedure BCMDButton3Click(Sender: TObject);
|
||||
procedure BCMDButton4Click(Sender: TObject);
|
||||
private
|
||||
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.BCMDButton1Click(Sender: TObject);
|
||||
begin
|
||||
PageControl1.ActivePageIndex := 0;
|
||||
end;
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
begin
|
||||
PageControl1.ActivePageIndex := 0;
|
||||
BCMDBUTTONCHECKMARKPOSITION := cmpBottom;
|
||||
BCMDBUTTONCHECKMARKCOLOR := ColorBox1.Selected;
|
||||
end;
|
||||
|
||||
procedure TForm1.ColorBox1Change(Sender: TObject);
|
||||
begin
|
||||
BCMDBUTTONCHECKMARKCOLOR := ColorBox1.Selected;
|
||||
Panel2.Invalidate;
|
||||
end;
|
||||
|
||||
procedure TForm1.BCMDButton10Click(Sender: TObject);
|
||||
begin
|
||||
BCMDBUTTONCHECKMARKPOSITION := cmpBottom;
|
||||
Panel2.ChildSizing.Layout := cclLeftToRightThenTopToBottom;
|
||||
Panel2.Align := alTop;
|
||||
Panel2.Invalidate;
|
||||
end;
|
||||
|
||||
procedure TForm1.BCMDButton11Click(Sender: TObject);
|
||||
begin
|
||||
BCMDBUTTONCHECKMARKPOSITION := cmpRight;
|
||||
Panel2.ChildSizing.Layout := cclTopToBottomThenLeftToRight;
|
||||
Panel2.Align := alRight;
|
||||
Panel2.Invalidate;
|
||||
end;
|
||||
|
||||
procedure TForm1.BCMDButton12Click(Sender: TObject);
|
||||
begin
|
||||
BCMDBUTTONCHECKMARKPOSITION := cmpTop;
|
||||
Panel2.ChildSizing.Layout := cclLeftToRightThenTopToBottom;
|
||||
Panel2.Align := alBottom;
|
||||
Panel2.Invalidate;
|
||||
end;
|
||||
|
||||
procedure TForm1.BCMDButton13Click(Sender: TObject);
|
||||
begin
|
||||
BCMDBUTTONANIMATION := BCMDButton13.Checked;
|
||||
end;
|
||||
|
||||
procedure TForm1.BCMDButton2Click(Sender: TObject);
|
||||
begin
|
||||
PageControl1.ActivePageIndex := 1;
|
||||
end;
|
||||
|
||||
procedure TForm1.BCMDButton3Click(Sender: TObject);
|
||||
begin
|
||||
PageControl1.ActivePageIndex := 2;
|
||||
end;
|
||||
|
||||
procedure TForm1.BCMDButton4Click(Sender: TObject);
|
||||
begin
|
||||
BCMDBUTTONCHECKMARKPOSITION := cmpLeft;
|
||||
Panel2.ChildSizing.Layout := cclTopToBottomThenLeftToRight;
|
||||
Panel2.Align := alLeft;
|
||||
Panel2.Invalidate;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user