You've already forked lazarus-ccr
Captcha: Fix layout of runtime demo
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8114 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -5,9 +5,9 @@
|
|||||||
Description
|
Description
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
The component TCaptcha descends from TGraphicControl and contains its own drawing
|
The component TCaptchaLabel descends from TGraphicControl and contains its own
|
||||||
routine. Just place it on the form and use it. It displays a random string with
|
drawing routine. Just place it on the form and use it. It displays a random
|
||||||
slanted characters and overlaid lines.
|
string with slanted characters and overlaid lines.
|
||||||
|
|
||||||
The method Verify() checks whether a user-provided string matches the
|
The method Verify() checks whether a user-provided string matches the
|
||||||
captcha string and returns true.
|
captcha string and returns true.
|
||||||
|
@ -2,24 +2,24 @@ object DemoForm: TDemoForm
|
|||||||
Left = 285
|
Left = 285
|
||||||
Height = 385
|
Height = 385
|
||||||
Top = 131
|
Top = 131
|
||||||
Width = 693
|
Width = 729
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Captcha Demo'
|
Caption = 'Captcha Demo'
|
||||||
ClientHeight = 385
|
ClientHeight = 385
|
||||||
ClientWidth = 693
|
ClientWidth = 729
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
LCLVersion = '2.3.0.0'
|
LCLVersion = '2.3.0.0'
|
||||||
object SettingsPanel: TPanel
|
object SettingsPanel: TPanel
|
||||||
Left = 16
|
Left = 16
|
||||||
Height = 239
|
Height = 238
|
||||||
Top = 130
|
Top = 131
|
||||||
Width = 661
|
Width = 697
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Around = 16
|
BorderSpacing.Around = 16
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 239
|
ClientHeight = 238
|
||||||
ClientWidth = 661
|
ClientWidth = 697
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object clbBackgroundColor: TColorBox
|
object clbBackgroundColor: TColorBox
|
||||||
AnchorSideLeft.Control = cmbNewCaptchaEvent
|
AnchorSideLeft.Control = cmbNewCaptchaEvent
|
||||||
@ -81,7 +81,7 @@ object DemoForm: TDemoForm
|
|||||||
Left = 260
|
Left = 260
|
||||||
Height = 103
|
Height = 103
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 412
|
Width = 420
|
||||||
AutoFill = True
|
AutoFill = True
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 24
|
BorderSpacing.Left = 24
|
||||||
@ -96,11 +96,11 @@ object DemoForm: TDemoForm
|
|||||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||||
ChildSizing.ControlsPerLine = 4
|
ChildSizing.ControlsPerLine = 4
|
||||||
ClientHeight = 83
|
ClientHeight = 83
|
||||||
ClientWidth = 408
|
ClientWidth = 416
|
||||||
Columns = 4
|
Columns = 4
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
'Alpha uppercase'
|
'Alpha upper-case'
|
||||||
'Alpha lowercase'
|
'Alpha lower-case'
|
||||||
'Numeric'
|
'Numeric'
|
||||||
'Custom'
|
'Custom'
|
||||||
'Rotated'
|
'Rotated'
|
||||||
@ -117,25 +117,13 @@ object DemoForm: TDemoForm
|
|||||||
Left = 16
|
Left = 16
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 52
|
Top = 52
|
||||||
Width = 106
|
Width = 111
|
||||||
Caption = ' '
|
Caption = ' '
|
||||||
end
|
end
|
||||||
object btnFont1: TButton
|
|
||||||
AnchorSideTop.Side = asrBottom
|
|
||||||
Left = 134
|
|
||||||
Height = 25
|
|
||||||
Top = 52
|
|
||||||
Width = 70
|
|
||||||
AutoSize = True
|
|
||||||
Caption = 'Font 1...'
|
|
||||||
Constraints.MaxWidth = 70
|
|
||||||
OnClick = btnFont1Click
|
|
||||||
TabOrder = 0
|
|
||||||
end
|
|
||||||
object btnFont2: TButton
|
object btnFont2: TButton
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 250
|
Left = 139
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 52
|
Top = 52
|
||||||
Width = 70
|
Width = 70
|
||||||
@ -148,6 +136,18 @@ object DemoForm: TDemoForm
|
|||||||
OnClick = btnFont2Click
|
OnClick = btnFont2Click
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
|
object btnFont1: TButton
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 260
|
||||||
|
Height = 25
|
||||||
|
Top = 52
|
||||||
|
Width = 68
|
||||||
|
AutoSize = True
|
||||||
|
Caption = 'Font 1...'
|
||||||
|
Constraints.MaxWidth = 70
|
||||||
|
OnClick = btnFont1Click
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object lblCharCount: TLabel
|
object lblCharCount: TLabel
|
||||||
AnchorSideLeft.Control = SettingsPanel
|
AnchorSideLeft.Control = SettingsPanel
|
||||||
@ -239,13 +239,16 @@ object DemoForm: TDemoForm
|
|||||||
end
|
end
|
||||||
object edUppercaseChars: TEdit
|
object edUppercaseChars: TEdit
|
||||||
AnchorSideLeft.Control = cmbNewCaptchaEvent
|
AnchorSideLeft.Control = cmbNewCaptchaEvent
|
||||||
|
AnchorSideTop.Control = cmbNewCaptchaEvent
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = cgOptions
|
AnchorSideRight.Control = cgOptions
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 113
|
Left = 113
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 135
|
Top = 134
|
||||||
Width = 559
|
Width = 567
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Top = 4
|
||||||
OnChange = edUppercaseCharsChange
|
OnChange = edUppercaseCharsChange
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
TextHint = 'Upper-case characters to be used'
|
TextHint = 'Upper-case characters to be used'
|
||||||
@ -256,7 +259,7 @@ object DemoForm: TDemoForm
|
|||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 139
|
Top = 138
|
||||||
Width = 60
|
Width = 60
|
||||||
Caption = 'Upper-case'
|
Caption = 'Upper-case'
|
||||||
end
|
end
|
||||||
@ -266,7 +269,7 @@ object DemoForm: TDemoForm
|
|||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 166
|
Top = 165
|
||||||
Width = 60
|
Width = 60
|
||||||
Caption = 'Lower-case'
|
Caption = 'Lower-case'
|
||||||
end
|
end
|
||||||
@ -278,8 +281,8 @@ object DemoForm: TDemoForm
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 113
|
Left = 113
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 162
|
Top = 161
|
||||||
Width = 559
|
Width = 567
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
OnChange = edLowercaseCharsChange
|
OnChange = edLowercaseCharsChange
|
||||||
@ -292,7 +295,7 @@ object DemoForm: TDemoForm
|
|||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 193
|
Top = 192
|
||||||
Width = 77
|
Width = 77
|
||||||
Caption = 'Numeric chars'
|
Caption = 'Numeric chars'
|
||||||
end
|
end
|
||||||
@ -304,8 +307,8 @@ object DemoForm: TDemoForm
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 113
|
Left = 113
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 189
|
Top = 188
|
||||||
Width = 559
|
Width = 567
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
OnChange = edNumericCharsChange
|
OnChange = edNumericCharsChange
|
||||||
@ -318,7 +321,7 @@ object DemoForm: TDemoForm
|
|||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 220
|
Top = 219
|
||||||
Width = 95
|
Width = 95
|
||||||
Caption = 'Any custom chars'
|
Caption = 'Any custom chars'
|
||||||
end
|
end
|
||||||
@ -330,8 +333,8 @@ object DemoForm: TDemoForm
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 113
|
Left = 113
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 216
|
Top = 215
|
||||||
Width = 559
|
Width = 567
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
OnChange = edCustomCharsChange
|
OnChange = edCustomCharsChange
|
||||||
@ -342,14 +345,14 @@ object DemoForm: TDemoForm
|
|||||||
object gbVerify: TGroupBox
|
object gbVerify: TGroupBox
|
||||||
Left = 16
|
Left = 16
|
||||||
Height = 69
|
Height = 69
|
||||||
Top = 25
|
Top = 26
|
||||||
Width = 661
|
Width = 697
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Around = 16
|
BorderSpacing.Around = 16
|
||||||
Caption = 'Enter CAPTCHA code'
|
Caption = 'Enter CAPTCHA code'
|
||||||
ClientHeight = 49
|
ClientHeight = 49
|
||||||
ClientWidth = 657
|
ClientWidth = 693
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object edTestCode: TEdit
|
object edTestCode: TEdit
|
||||||
AnchorSideLeft.Control = gbVerify
|
AnchorSideLeft.Control = gbVerify
|
||||||
@ -359,7 +362,7 @@ object DemoForm: TDemoForm
|
|||||||
Left = 16
|
Left = 16
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 13
|
Top = 13
|
||||||
Width = 472
|
Width = 508
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 16
|
BorderSpacing.Left = 16
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
@ -371,7 +374,7 @@ object DemoForm: TDemoForm
|
|||||||
AnchorSideTop.Control = gbVerify
|
AnchorSideTop.Control = gbVerify
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
AnchorSideRight.Control = btnTryAgain
|
AnchorSideRight.Control = btnTryAgain
|
||||||
Left = 500
|
Left = 536
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 12
|
Top = 12
|
||||||
Width = 56
|
Width = 56
|
||||||
@ -389,7 +392,7 @@ object DemoForm: TDemoForm
|
|||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
AnchorSideRight.Control = gbVerify
|
AnchorSideRight.Control = gbVerify
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 564
|
Left = 600
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 12
|
Top = 12
|
||||||
Width = 77
|
Width = 77
|
||||||
@ -404,8 +407,8 @@ object DemoForm: TDemoForm
|
|||||||
object Bevel1: TBevel
|
object Bevel1: TBevel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 4
|
Height = 4
|
||||||
Top = 110
|
Top = 111
|
||||||
Width = 693
|
Width = 729
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
Shape = bsBottomLine
|
Shape = bsBottomLine
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user