Merge branch 'remove_duplicate_bitbutton_example' into 'main'

remove duplicate bitbutton example

See merge request freepascal.org/lazarus/lazarus!458
This commit is contained in:
Juha Manninen 2025-04-09 20:30:05 +00:00
commit fe380b0fe9
6 changed files with 0 additions and 373 deletions

View File

@ -1,129 +0,0 @@
object Form1: TForm1
Left = 270
Height = 170
Top = 131
Width = 335
Caption = 'TBitBtn Verify'
ClientHeight = 170
ClientWidth = 335
OnCreate = FormCreate
LCLVersion = '2.3.0.0'
object Button1: TBitBtn
Left = 12
Height = 120
Top = 12
Width = 120
Caption = 'Button1'
TabOrder = 0
end
object GroupBox1: TGroupBox
Left = 144
Height = 120
Top = 12
Width = 80
Caption = 'Kind'
ClientHeight = 100
ClientWidth = 76
TabOrder = 1
object RadioButton1: TRadioButton
Left = 8
Height = 19
Top = 6
Width = 47
Caption = 'Close'
Checked = True
OnChange = RadioButton1Change
TabOrder = 3
TabStop = True
end
object RadioButton2: TRadioButton
Left = 8
Height = 19
Top = 28
Width = 34
Caption = 'OK'
OnChange = RadioButton2Change
TabOrder = 0
end
object RadioButton3: TRadioButton
Left = 8
Height = 19
Top = 50
Width = 54
Caption = 'Cancel'
OnChange = RadioButton3Change
TabOrder = 1
end
object RadioButton4: TRadioButton
Left = 8
Height = 19
Top = 72
Width = 43
Caption = 'Help'
OnChange = RadioButton4Change
TabOrder = 2
end
end
object GroupBox2: TGroupBox
Left = 240
Height = 120
Top = 12
Width = 80
Caption = 'Type'
ClientHeight = 100
ClientWidth = 76
TabOrder = 2
object RadioButton5: TRadioButton
Left = 8
Height = 19
Top = 6
Width = 38
Caption = 'Left'
Checked = True
OnChange = RadioButton5Change
TabOrder = 0
TabStop = True
end
object RadioButton6: TRadioButton
Left = 8
Height = 19
Top = 28
Width = 38
Caption = 'Top'
OnChange = RadioButton6Change
TabOrder = 1
end
object RadioButton7: TRadioButton
Left = 8
Height = 19
Top = 50
Width = 46
Caption = 'Right'
OnChange = RadioButton7Change
TabOrder = 2
end
object RadioButton8: TRadioButton
Left = 8
Height = 19
Top = 72
Width = 58
Caption = 'Bottom'
OnChange = RadioButton8Change
TabOrder = 3
end
end
object Label1: TLabel
Left = 144
Height = 15
Top = 144
Width = 34
Caption = 'Label1'
end
object Label2: TLabel
Left = 240
Height = 15
Top = 144
Width = 34
Caption = 'Label2'
end
end

View File

@ -1,108 +0,0 @@
unit BitBtnForm;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, Buttons, ExtCtrls,
StdCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TBitBtn;
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
Label1: TLabel;
Label2: TLabel;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
RadioButton3: TRadioButton;
RadioButton4: TRadioButton;
RadioButton5: TRadioButton;
RadioButton6: TRadioButton;
RadioButton7: TRadioButton;
RadioButton8: TRadioButton;
procedure FormCreate(Sender: TObject);
procedure RadioButton1Change(Sender: TObject);
procedure RadioButton2Change(Sender: TObject);
procedure RadioButton3Change(Sender: TObject);
procedure RadioButton4Change(Sender: TObject);
procedure RadioButton5Change(Sender: TObject);
procedure RadioButton6Change(Sender: TObject);
procedure RadioButton7Change(Sender: TObject);
procedure RadioButton8Change(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
RadioButton1Change(nil);
RadioButton5Change(nil);
end;
procedure TForm1.RadioButton1Change(Sender: TObject);
begin
Button1.Kind := bkClose;
Label1.Caption := 'bkClose';
end;
procedure TForm1.RadioButton2Change(Sender: TObject);
begin
Button1.Kind := bkOK;
Label1.Caption := 'bkOK';
end;
procedure TForm1.RadioButton3Change(Sender: TObject);
begin
Button1.Kind := bkCancel;
Label1.Caption := 'bkCancel';
end;
procedure TForm1.RadioButton4Change(Sender: TObject);
begin
Button1.Kind := bkHelp;
Label1.Caption := 'bkHelp';
end;
procedure TForm1.RadioButton5Change(Sender: TObject);
begin
Button1.Layout := blGlyphLeft;
Label2.Caption := 'blGlyphLeft';
end;
procedure TForm1.RadioButton6Change(Sender: TObject);
begin
Button1.Layout := blGlyphTop;
Label2.Caption := 'blGlyphTop';
end;
procedure TForm1.RadioButton7Change(Sender: TObject);
begin
Button1.Layout := blGlyphRight;
Label2.Caption := 'blGlyphRight';
end;
procedure TForm1.RadioButton8Change(Sender: TObject);
begin
Button1.Layout := blGlyphBottom;
Label2.Caption := 'blGlyphBottom';
end;
end.

View File

@ -1,9 +0,0 @@
{
"BitButton" : {
"Category" : "General",
"Keywords" : [
"TBitButton"
],
"Description" : "This example shows how a BitButton, that is a button with a small bitmap, can be used."
}
}

View File

@ -1,81 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="12"/>
<PathDelim Value="\"/>
<General>
<Flags>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<Title Value="BitButton"/>
<Scaled Value="True"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
</General>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
<UseFileFilters Value="True"/>
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
</RunParams>
<RequiredPackages Count="1">
<Item1>
<PackageName Value="LCL"/>
</Item1>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="bitbutton.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="BitButton_Demo"/>
</Unit0>
<Unit1>
<Filename Value="bitbtnform.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="BitBtnForm"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="BitButton"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<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>

View File

@ -1,46 +0,0 @@
{
***************************************************************************
* *
* This source is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This code is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* General Public License for more details. *
* *
* A copy of the GNU General Public License is available on the World *
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
* obtain it by writing to the Free Software Foundation, *
* Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1335, USA. *
* *
***************************************************************************
}
program BitButton_Demo;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}
cthreads,
{$ENDIF}
{$IFDEF HASAMIGA}
athreads,
{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, BitBtnForm
{ you can add units after this };
{$R *.res}
begin
RequireDerivedFormResource:=True;
Application.Title:='BitButton';
Application.Scaled:=True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

Binary file not shown.