You've already forked lazarus-ccr
jvcllaz: Improved layout of JvSpecialProgress demo
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6992 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
object MainForm: TMainForm
|
||||
Left = 258
|
||||
Height = 358
|
||||
Height = 332
|
||||
Top = 127
|
||||
Width = 459
|
||||
Caption = 'JvSpecialProgress Demo'
|
||||
ClientHeight = 358
|
||||
ClientHeight = 332
|
||||
ClientWidth = 459
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '2.1.0.0'
|
||||
@ -15,12 +15,18 @@ object MainForm: TMainForm
|
||||
Width = 176
|
||||
end
|
||||
object JvSpecialProgress1: TJvSpecialProgress
|
||||
AnchorSideLeft.Control = Bevel1
|
||||
AnchorSideTop.Control = Bevel1
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = Bevel1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 32
|
||||
Height = 15
|
||||
Top = 27
|
||||
Width = 150
|
||||
Width = 152
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 12
|
||||
BorderSpacing.Right = 12
|
||||
Caption = 'JvSpecialProgress1'
|
||||
Position = 50
|
||||
end
|
||||
@ -34,64 +40,88 @@ object MainForm: TMainForm
|
||||
OnChange = ScrollBar1Change
|
||||
end
|
||||
object CbStartColor: TColorBox
|
||||
Left = 328
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
Left = 334
|
||||
Height = 22
|
||||
Top = 22
|
||||
Top = 12
|
||||
Width = 100
|
||||
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
|
||||
BorderSpacing.Left = 32
|
||||
ItemHeight = 16
|
||||
OnChange = CbStartColorChange
|
||||
TabOrder = 1
|
||||
end
|
||||
object Label1: TLabel
|
||||
AnchorSideTop.Control = CbStartColor
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 245
|
||||
Height = 15
|
||||
Top = 26
|
||||
Top = 16
|
||||
Width = 57
|
||||
Caption = 'Start color:'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideTop.Control = CbEndColor
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 245
|
||||
Height = 15
|
||||
Top = 60
|
||||
Top = 44
|
||||
Width = 53
|
||||
Caption = 'End color:'
|
||||
ParentColor = False
|
||||
end
|
||||
object CbEndColor: TColorBox
|
||||
Left = 328
|
||||
AnchorSideLeft.Control = CbStartColor
|
||||
AnchorSideTop.Control = CbStartColor
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 334
|
||||
Height = 22
|
||||
Top = 56
|
||||
Top = 40
|
||||
Width = 100
|
||||
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
|
||||
BorderSpacing.Top = 6
|
||||
ItemHeight = 16
|
||||
OnChange = CbEndColorChange
|
||||
TabOrder = 2
|
||||
end
|
||||
object CbGradientBlocks: TCheckBox
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideTop.Control = CbEndColor
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 245
|
||||
Height = 19
|
||||
Top = 96
|
||||
Top = 74
|
||||
Width = 102
|
||||
BorderSpacing.Top = 12
|
||||
Caption = 'Gradient blocks'
|
||||
OnChange = CbGradientBlocksChange
|
||||
TabOrder = 3
|
||||
end
|
||||
object CbSolid: TCheckBox
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideTop.Control = CbGradientBlocks
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 245
|
||||
Height = 19
|
||||
Top = 128
|
||||
Top = 99
|
||||
Width = 46
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'Solid'
|
||||
OnChange = CbSolidChange
|
||||
TabOrder = 4
|
||||
end
|
||||
object CbBorder: TCheckBox
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideTop.Control = CbSolid
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 245
|
||||
Height = 19
|
||||
Top = 159
|
||||
Top = 124
|
||||
Width = 55
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'Border'
|
||||
OnChange = CbBorderChange
|
||||
TabOrder = 5
|
||||
@ -105,9 +135,12 @@ object MainForm: TMainForm
|
||||
ParentColor = False
|
||||
end
|
||||
object CbBorderColor: TColorBox
|
||||
Left = 328
|
||||
AnchorSideLeft.Control = CbStartColor
|
||||
AnchorSideTop.Control = Bevel2
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 334
|
||||
Height = 22
|
||||
Top = 170
|
||||
Top = 135
|
||||
Width = 100
|
||||
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
|
||||
ItemHeight = 16
|
||||
@ -115,19 +148,27 @@ object MainForm: TMainForm
|
||||
TabOrder = 6
|
||||
end
|
||||
object CbFlat: TCheckBox
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideTop.Control = CbBorder
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 245
|
||||
Height = 19
|
||||
Top = 184
|
||||
Top = 149
|
||||
Width = 39
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'Flat'
|
||||
OnChange = CbFlatChange
|
||||
TabOrder = 7
|
||||
end
|
||||
object CbTextOption: TComboBox
|
||||
Left = 328
|
||||
AnchorSideLeft.Control = CbStartColor
|
||||
AnchorSideTop.Control = CbTextCentered
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 334
|
||||
Height = 23
|
||||
Top = 216
|
||||
Top = 199
|
||||
Width = 100
|
||||
BorderSpacing.Top = 6
|
||||
ItemHeight = 15
|
||||
Items.Strings = (
|
||||
'toCaption'
|
||||
@ -140,55 +181,115 @@ object MainForm: TMainForm
|
||||
Text = 'CbTextOption'
|
||||
end
|
||||
object Label4: TLabel
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideTop.Control = CbTextOption
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 245
|
||||
Height = 15
|
||||
Top = 220
|
||||
Top = 203
|
||||
Width = 62
|
||||
Caption = 'Text option:'
|
||||
ParentColor = False
|
||||
end
|
||||
object CbTextCentered: TCheckBox
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideTop.Control = CbFlat
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 245
|
||||
Height = 19
|
||||
Top = 304
|
||||
Top = 174
|
||||
Width = 91
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'Text centered'
|
||||
OnChange = CbTextCenteredChange
|
||||
TabOrder = 9
|
||||
end
|
||||
object EdFormat: TEdit
|
||||
Left = 328
|
||||
AnchorSideLeft.Control = CbStartColor
|
||||
AnchorSideTop.Control = CbTextOption
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 334
|
||||
Height = 23
|
||||
Top = 244
|
||||
Top = 228
|
||||
Width = 100
|
||||
BorderSpacing.Top = 6
|
||||
TabOrder = 10
|
||||
Text = '%0:d%% done (%1:d of %2:d).'
|
||||
end
|
||||
object LblFormat: TLabel
|
||||
Left = 247
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideTop.Control = EdFormat
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 245
|
||||
Height = 15
|
||||
Top = 248
|
||||
Top = 232
|
||||
Width = 38
|
||||
Caption = 'Format'
|
||||
FocusControl = EdFormat
|
||||
ParentColor = False
|
||||
end
|
||||
object CbTextColor: TColorBox
|
||||
Left = 328
|
||||
AnchorSideLeft.Control = CbStartColor
|
||||
AnchorSideTop.Control = EdFormat
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 334
|
||||
Height = 22
|
||||
Top = 272
|
||||
Top = 257
|
||||
Width = 100
|
||||
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
|
||||
BorderSpacing.Top = 6
|
||||
ItemHeight = 16
|
||||
OnChange = CbTextColorChange
|
||||
TabOrder = 11
|
||||
end
|
||||
object Label5: TLabel
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideTop.Control = CbTextColor
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 245
|
||||
Height = 15
|
||||
Top = 276
|
||||
Top = 261
|
||||
Width = 54
|
||||
Caption = 'Text color:'
|
||||
ParentColor = False
|
||||
end
|
||||
object Bevel2: TBevel
|
||||
AnchorSideTop.Control = CbBorder
|
||||
AnchorSideBottom.Control = CbFlat
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 192
|
||||
Height = 44
|
||||
Top = 124
|
||||
Width = 40
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
Shape = bsSpacer
|
||||
end
|
||||
object seHeight: TSpinEdit
|
||||
AnchorSideLeft.Control = CbTextColor
|
||||
AnchorSideTop.Control = CbTextColor
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = CbTextColor
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 334
|
||||
Height = 23
|
||||
Top = 285
|
||||
Width = 100
|
||||
Alignment = taRightJustify
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
OnChange = seHeightChange
|
||||
TabOrder = 12
|
||||
Value = 15
|
||||
end
|
||||
object LblHeight: TLabel
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideTop.Control = seHeight
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 245
|
||||
Height = 15
|
||||
Top = 289
|
||||
Width = 36
|
||||
Caption = 'Height'
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
||||
|
@ -6,7 +6,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ColorBox,
|
||||
ExtCtrls, JvSpecialProgress;
|
||||
ExtCtrls, Spin, JvSpecialProgress;
|
||||
|
||||
type
|
||||
|
||||
@ -14,6 +14,7 @@ type
|
||||
|
||||
TMainForm = class(TForm)
|
||||
Bevel1: TBevel;
|
||||
Bevel2: TBevel;
|
||||
CbBorderColor: TColorBox;
|
||||
CbTextColor: TColorBox;
|
||||
CbTextCentered: TCheckBox;
|
||||
@ -31,8 +32,10 @@ type
|
||||
Label3: TLabel;
|
||||
Label4: TLabel;
|
||||
Label5: TLabel;
|
||||
LblHeight: TLabel;
|
||||
LblFormat: TLabel;
|
||||
ScrollBar1: TScrollBar;
|
||||
seHeight: TSpinEdit;
|
||||
procedure CbBorderChange(Sender: TObject);
|
||||
procedure CbBorderColorChange(Sender: TObject);
|
||||
procedure CbTextColorChange(Sender: TObject);
|
||||
@ -45,6 +48,7 @@ type
|
||||
procedure CbTextOptionChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure ScrollBar1Change(Sender: TObject);
|
||||
procedure seHeightChange(Sender: TObject);
|
||||
private
|
||||
FSavedCaption: String;
|
||||
|
||||
@ -66,6 +70,11 @@ begin
|
||||
JvSpecialProgress1.Position := Scrollbar1.Position;
|
||||
end;
|
||||
|
||||
procedure TMainForm.seHeightChange(Sender: TObject);
|
||||
begin
|
||||
JvSpecialProgress1.Height := seHeight.Value;
|
||||
end;
|
||||
|
||||
procedure TMainForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
FSavedCaption := JvSpecialProgress1.Caption;
|
||||
@ -85,6 +94,7 @@ begin
|
||||
CbTextColor.Selected := GetDefaultColor(dctFont)
|
||||
else
|
||||
CbTextColor.Selected := JvSpecialProgress1.Font.Color;
|
||||
seHeight.Value := JvSpecialProgress1.Height;
|
||||
end;
|
||||
|
||||
procedure TMainForm.CbStartColorChange(Sender: TObject);
|
||||
|
Reference in New Issue
Block a user