You've already forked lazarus-ccr
jvcllaz: Add new component TJvBehaviorLabel
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7082 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -25,6 +25,7 @@ tjvgroupheader_200.png
|
||||
tjvrollout.png
|
||||
tjvrollout_150.png
|
||||
tjvrollout_200.png
|
||||
tjvbehaviorlabel.bmp
|
||||
tjvcombolistbox.bmp
|
||||
tjvlookupautocomplete.bmp
|
||||
tjvinstalllabel.bmp
|
||||
|
BIN
components/jvcllaz/design/JvCtrls/images/tjvbehaviorlabel.bmp
Normal file
BIN
components/jvcllaz/design/JvCtrls/images/tjvbehaviorlabel.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
components/jvcllaz/design/JvCtrls/images/tjvmovablebevel_150.png
Normal file
BIN
components/jvcllaz/design/JvCtrls/images/tjvmovablebevel_150.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
components/jvcllaz/design/JvCtrls/images/tjvmovablebevel_200.png
Normal file
BIN
components/jvcllaz/design/JvCtrls/images/tjvmovablebevel_200.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
97
components/jvcllaz/design/JvCtrls/jvbehaviorlabeleditor.pas
Normal file
97
components/jvcllaz/design/JvCtrls/jvbehaviorlabeleditor.pas
Normal file
@ -0,0 +1,97 @@
|
||||
{-----------------------------------------------------------------------------
|
||||
The contents of this file are subject to the Mozilla Public License
|
||||
Version 1.1 (the "License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/MPL-1.1.html
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for
|
||||
the specific language governing rights and limitations under the License.
|
||||
|
||||
The Original Code is: JvBandsReg.PAS, released on 2002-05-26.
|
||||
|
||||
The Initial Developer of the Original Code is John Doe.
|
||||
Portions created by John Doe are Copyright (C) 2003 John Doe.
|
||||
All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
You may retrieve the latest version of this file at the Project JEDI's JVCL home page,
|
||||
located at http://jvcl.delphi-jedi.org
|
||||
|
||||
Known Issues:
|
||||
-----------------------------------------------------------------------------}
|
||||
// $Id$
|
||||
|
||||
unit JvBehaviorLabelEditor;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils,
|
||||
PropEdits;
|
||||
// DesignEditors, DesignIntf;
|
||||
|
||||
type
|
||||
TJvLabelBehaviorProperty = class(TStringProperty)
|
||||
public
|
||||
function AutoFill: Boolean; override;
|
||||
procedure SetValue(const Value: string); override;
|
||||
procedure GetValues(Proc: TGetStrProc); override;
|
||||
function GetAttributes: TPropertyAttributes; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
JvBehaviorLabel; //, JvDsgnTypes;
|
||||
|
||||
function TJvLabelBehaviorProperty.AutoFill: Boolean;
|
||||
begin
|
||||
Result := inherited AutoFill;
|
||||
// if you want to fix the flickering when double-clicking a value, uncomment line below:
|
||||
// Result := False;
|
||||
end;
|
||||
|
||||
function TJvLabelBehaviorProperty.GetAttributes: TPropertyAttributes;
|
||||
begin
|
||||
Result := [paValueList, paRevertable, paMultiSelect];
|
||||
end;
|
||||
|
||||
procedure TJvLabelBehaviorProperty.GetValues(Proc: TGetStrProc);
|
||||
var
|
||||
S: TStringList;
|
||||
I: Integer;
|
||||
begin
|
||||
S := TStringList.Create;
|
||||
try
|
||||
GetRegisteredLabelBehaviorOptions(S);
|
||||
S.Sort;
|
||||
for I := 0 to S.Count -1 do
|
||||
Proc(S[I]);
|
||||
finally
|
||||
S.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TJvLabelBehaviorProperty.SetValue(const Value: string);
|
||||
{
|
||||
var wp -- to do
|
||||
List: IDesignerSelections;
|
||||
LDesigner: IJvFormDesigner;
|
||||
}
|
||||
begin
|
||||
inherited SetValue(Value);
|
||||
{
|
||||
List := CreateSelectionList;
|
||||
Designer.GetSelections(List);
|
||||
LDesigner := Designer; // keep Designer alive
|
||||
LDesigner.SetSelections(nil);
|
||||
LDesigner.SetSelections(List);
|
||||
//Designer.Modified;
|
||||
}
|
||||
end;
|
||||
|
||||
end.
|
@ -15,6 +15,7 @@ implementation
|
||||
|
||||
uses
|
||||
Classes, Controls, ActnList, PropEdits, JvDsgnConsts,
|
||||
JvBehaviorLabel, JvBehaviorLabelEditor,
|
||||
JvMovableBevel, JvRuler, JvGroupHeader, JvRollOut,
|
||||
JvHtControls, JvHint, JvHTHintForm, JvComboListBox, JvInstallLabel,
|
||||
JvOfficeColorPanel,
|
||||
@ -23,11 +24,13 @@ uses
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterComponents(RsPaletteJvclVisual, [
|
||||
TJvBehaviorLabel,
|
||||
TJvMovableBevel, TJvMovablePanel, TJvRuler, TJvGroupHeader, TJvRollOut,
|
||||
TJvHint, TJvHTLabel, TJvHTListbox, TJvHTCombobox, TJvComboListBox,
|
||||
TJvOfficeColorPanel,
|
||||
TJvLookupAutoComplete, TJvInstallLabel
|
||||
]);
|
||||
RegisterPropertyEditor(TypeInfo(TJvLabelBehaviorName), TJvBehaviorLabel, 'Behavior', TJvLabelBehaviorProperty);
|
||||
RegisterPropertyEditor(TypeInfo(TCaption), TJvHTLabel, 'Caption', TJvHintProperty);
|
||||
RegisterActions(RsJVCLActionsCategory, [TJvRollOutAction], nil);
|
||||
end;
|
||||
|
@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="12"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<Title Value="JvBehaviorLabelDemo"/>
|
||||
<Scaled Value="True"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<BuildModes>
|
||||
<Item Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<UseFileFilters Value="True"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="0"/>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="JvCtrlsLazR"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units>
|
||||
<Unit>
|
||||
<Filename Value="JvBehaviorLabelDemo.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit>
|
||||
<Unit>
|
||||
<Filename Value="JvBehaviorLblMainFrmU.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="JvBehaviorLblMainFrm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
</Unit>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="..\..\bin\$(TargetCPU)-$(TargetOS)\JvBehaviorLabelDemo"/>
|
||||
</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>
|
@ -0,0 +1,14 @@
|
||||
program JvBehaviorLabelDemo;
|
||||
|
||||
uses
|
||||
Interfaces, Forms,
|
||||
JvBehaviorLblMainFrmU in 'JvBehaviorLblMainFrmU.pas' {JvBehaviorLblMainFrm};
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
Application.Scaled:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TJvBehaviorLblMainFrm, JvBehaviorLblMainFrm);
|
||||
Application.Run;
|
||||
end.
|
@ -0,0 +1,281 @@
|
||||
object JvBehaviorLblMainFrm: TJvBehaviorLblMainFrm
|
||||
Left = 327
|
||||
Height = 304
|
||||
Top = 118
|
||||
Width = 572
|
||||
AutoSize = True
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'JvBehaviorLabel Demo'
|
||||
ClientHeight = 304
|
||||
ClientWidth = 572
|
||||
Color = clBtnFace
|
||||
Font.Color = clWindowText
|
||||
LCLVersion = '2.1.0.0'
|
||||
object lblCodeBreaker: TJvBehaviorLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 24
|
||||
Height = 22
|
||||
Top = 18
|
||||
Width = 259
|
||||
Behavior = 'CodeBreaker'
|
||||
BehaviorOptions.DecodedText = 'ENTER THE MATRIX!'
|
||||
BehaviorOptions.Interval = 5
|
||||
Alignment = taCenter
|
||||
AutoSize = False
|
||||
BorderSpacing.Left = 24
|
||||
BorderSpacing.Top = 18
|
||||
Caption = 'x6/yhjSkhHHDski"=90sd'
|
||||
Color = clBlack
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
Font.Color = clLime
|
||||
Font.Height = -19
|
||||
Font.Name = 'Courier New'
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowAccelChar = False
|
||||
Transparent = False
|
||||
end
|
||||
object lblAppearing: TJvBehaviorLabel
|
||||
AnchorSideLeft.Control = lblCodeBreaker
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = lblCodeBreaker
|
||||
Left = 301
|
||||
Height = 22
|
||||
Top = 18
|
||||
Width = 259
|
||||
Behavior = 'Appearing'
|
||||
BehaviorOptions.Delay = 10
|
||||
BehaviorOptions.Pixels = 2
|
||||
Alignment = taCenter
|
||||
AutoSize = False
|
||||
BorderSpacing.Left = 18
|
||||
BorderSpacing.Right = 24
|
||||
Caption = 'MAKE ME APPEAR'
|
||||
Color = clBlack
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
Font.Color = clLime
|
||||
Font.Height = -19
|
||||
Font.Name = 'Courier New'
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
Transparent = False
|
||||
end
|
||||
object lblBlinking: TJvBehaviorLabel
|
||||
AnchorSideLeft.Control = lblCodeBreaker
|
||||
AnchorSideTop.Control = btnCodeBreak
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 24
|
||||
Height = 22
|
||||
Top = 91
|
||||
Width = 259
|
||||
Behavior = 'Blinking'
|
||||
BehaviorOptions.Interval = 220
|
||||
Alignment = taCenter
|
||||
AutoSize = False
|
||||
BorderSpacing.Top = 18
|
||||
Caption = 'BLINK ME'
|
||||
Color = clBlack
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
Font.Color = clLime
|
||||
Font.Height = -19
|
||||
Font.Name = 'Courier New'
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
Transparent = False
|
||||
end
|
||||
object lblBouncing: TJvBehaviorLabel
|
||||
AnchorSideLeft.Control = lblAppearing
|
||||
AnchorSideTop.Control = lblBlinking
|
||||
Left = 301
|
||||
Height = 22
|
||||
Top = 91
|
||||
Width = 259
|
||||
Behavior = 'Bouncing'
|
||||
BehaviorOptions.Interval = 12
|
||||
BehaviorOptions.Pixels = 4
|
||||
Alignment = taCenter
|
||||
AutoSize = False
|
||||
Caption = 'BOUNCE ME'
|
||||
Color = clBlack
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
Font.Color = clLime
|
||||
Font.Height = -19
|
||||
Font.Name = 'Courier New'
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
Transparent = False
|
||||
end
|
||||
object lblScrolling: TJvBehaviorLabel
|
||||
AnchorSideLeft.Control = lblCodeBreaker
|
||||
AnchorSideTop.Control = btnBlink
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 24
|
||||
Height = 22
|
||||
Top = 164
|
||||
Width = 259
|
||||
Behavior = 'Scrolling'
|
||||
BehaviorOptions.Interval = 70
|
||||
Alignment = taCenter
|
||||
AutoSize = False
|
||||
BorderSpacing.Top = 18
|
||||
Caption = 'SCROLL ME'
|
||||
Color = clBlack
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
Font.Color = clLime
|
||||
Font.Height = -19
|
||||
Font.Name = 'Courier New'
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
Transparent = False
|
||||
end
|
||||
object lblSpecial: TJvBehaviorLabel
|
||||
AnchorSideLeft.Control = lblAppearing
|
||||
AnchorSideTop.Control = lblScrolling
|
||||
Left = 301
|
||||
Height = 22
|
||||
Top = 164
|
||||
Width = 259
|
||||
Behavior = 'Special'
|
||||
BehaviorOptions.Interval = 35
|
||||
Alignment = taCenter
|
||||
AutoSize = False
|
||||
Caption = 'I ACT IN A SPECIAL WAY'
|
||||
Color = clBlack
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
Font.Color = clLime
|
||||
Font.Height = -19
|
||||
Font.Name = 'Courier New'
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
Transparent = False
|
||||
end
|
||||
object lblTyping: TJvBehaviorLabel
|
||||
AnchorSideLeft.Control = lblCodeBreaker
|
||||
AnchorSideTop.Control = btnScroll
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 24
|
||||
Height = 22
|
||||
Top = 237
|
||||
Width = 259
|
||||
Behavior = 'Typing'
|
||||
Alignment = taCenter
|
||||
AutoSize = False
|
||||
BorderSpacing.Top = 18
|
||||
Caption = 'TYPE THE TEXT'
|
||||
Color = clBlack
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
Font.Color = clLime
|
||||
Font.Height = -19
|
||||
Font.Name = 'Courier New'
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
Transparent = False
|
||||
end
|
||||
object btnCodeBreak: TButton
|
||||
AnchorSideLeft.Control = lblCodeBreaker
|
||||
AnchorSideTop.Control = lblCodeBreaker
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 38
|
||||
Height = 25
|
||||
Top = 48
|
||||
Width = 80
|
||||
BorderSpacing.Left = 14
|
||||
BorderSpacing.Top = 8
|
||||
Caption = '&CodeBreaker'
|
||||
OnClick = btnCodeBreakClick
|
||||
TabOrder = 0
|
||||
end
|
||||
object btnAppear: TButton
|
||||
AnchorSideLeft.Control = lblAppearing
|
||||
AnchorSideTop.Control = btnCodeBreak
|
||||
Left = 315
|
||||
Height = 25
|
||||
Top = 48
|
||||
Width = 80
|
||||
BorderSpacing.Left = 14
|
||||
Caption = '&Appearing'
|
||||
OnClick = btnAppearClick
|
||||
TabOrder = 1
|
||||
end
|
||||
object btnBlink: TButton
|
||||
AnchorSideLeft.Control = btnCodeBreak
|
||||
AnchorSideTop.Control = lblBlinking
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 38
|
||||
Height = 25
|
||||
Top = 121
|
||||
Width = 80
|
||||
BorderSpacing.Top = 8
|
||||
Caption = '&Blinking'
|
||||
OnClick = btnBlinkClick
|
||||
TabOrder = 2
|
||||
end
|
||||
object btnBounce: TButton
|
||||
AnchorSideLeft.Control = btnAppear
|
||||
AnchorSideTop.Control = btnBlink
|
||||
Left = 315
|
||||
Height = 25
|
||||
Top = 121
|
||||
Width = 80
|
||||
Caption = 'B&ouncing'
|
||||
OnClick = btnBounceClick
|
||||
TabOrder = 3
|
||||
end
|
||||
object btnScroll: TButton
|
||||
AnchorSideLeft.Control = btnCodeBreak
|
||||
AnchorSideTop.Control = lblScrolling
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 38
|
||||
Height = 25
|
||||
Top = 194
|
||||
Width = 80
|
||||
BorderSpacing.Top = 8
|
||||
Caption = '&Scrolling'
|
||||
OnClick = btnScrollClick
|
||||
TabOrder = 4
|
||||
end
|
||||
object btnSpecial: TButton
|
||||
AnchorSideLeft.Control = btnAppear
|
||||
AnchorSideTop.Control = btnScroll
|
||||
Left = 315
|
||||
Height = 25
|
||||
Top = 194
|
||||
Width = 80
|
||||
Caption = 'S&pecial'
|
||||
OnClick = btnSpecialClick
|
||||
TabOrder = 5
|
||||
end
|
||||
object btnType: TButton
|
||||
AnchorSideLeft.Control = btnCodeBreak
|
||||
AnchorSideTop.Control = lblTyping
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 38
|
||||
Height = 25
|
||||
Top = 267
|
||||
Width = 80
|
||||
BorderSpacing.Top = 8
|
||||
BorderSpacing.Bottom = 18
|
||||
Caption = '&Typing'
|
||||
OnClick = btnTypeClick
|
||||
TabOrder = 6
|
||||
end
|
||||
object btnAll: TButton
|
||||
AnchorSideLeft.Control = btnAppear
|
||||
AnchorSideTop.Control = btnType
|
||||
Left = 315
|
||||
Height = 25
|
||||
Top = 267
|
||||
Width = 80
|
||||
Caption = 'Do ''em all!'
|
||||
OnClick = btnAllClick
|
||||
TabOrder = 7
|
||||
end
|
||||
end
|
@ -0,0 +1,135 @@
|
||||
{******************************************************************
|
||||
|
||||
JEDI-VCL Demo
|
||||
|
||||
Copyright (C) 2002 Project JEDI
|
||||
|
||||
Original author:
|
||||
|
||||
You may retrieve the latest version of this file at the JEDI-JVCL
|
||||
home page, located at http://jvcl.delphi-jedi.org
|
||||
|
||||
The contents of this file are used with permission, subject to
|
||||
the Mozilla Public License Version 1.1 (the "License"); you may
|
||||
not use this file except in compliance with the License. You may
|
||||
obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/MPL-1_1Final.html
|
||||
|
||||
Software distributed under the License is distributed on an
|
||||
"AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
******************************************************************}
|
||||
|
||||
unit JvBehaviorLblMainFrmU;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, JvBehaviorLabel;
|
||||
|
||||
type
|
||||
TJvBehaviorLblMainFrm = class(TForm)
|
||||
lblCodeBreaker: TJvBehaviorLabel;
|
||||
btnCodeBreak: TButton;
|
||||
lblAppearing: TJvBehaviorLabel;
|
||||
btnAppear: TButton;
|
||||
lblBlinking: TJvBehaviorLabel;
|
||||
btnBlink: TButton;
|
||||
lblBouncing: TJvBehaviorLabel;
|
||||
btnBounce: TButton;
|
||||
lblScrolling: TJvBehaviorLabel;
|
||||
btnScroll: TButton;
|
||||
lblSpecial: TJvBehaviorLabel;
|
||||
btnSpecial: TButton;
|
||||
lblTyping: TJvBehaviorLabel;
|
||||
btnType: TButton;
|
||||
btnAll: TButton;
|
||||
procedure btnCodeBreakClick(Sender: TObject);
|
||||
procedure btnAppearClick(Sender: TObject);
|
||||
procedure btnBlinkClick(Sender: TObject);
|
||||
procedure btnBounceClick(Sender: TObject);
|
||||
procedure btnScrollClick(Sender: TObject);
|
||||
procedure btnSpecialClick(Sender: TObject);
|
||||
procedure btnTypeClick(Sender: TObject);
|
||||
procedure btnAllClick(Sender: TObject);
|
||||
private
|
||||
procedure DoCodeBreakStart(Sender:TObject);
|
||||
procedure DoCodeBreakStop(Sender:TObject);
|
||||
public
|
||||
end;
|
||||
|
||||
var
|
||||
JvBehaviorLblMainFrm: TJvBehaviorLblMainFrm;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
procedure TJvBehaviorLblMainFrm.btnCodeBreakClick(Sender: TObject);
|
||||
begin
|
||||
Randomize;
|
||||
lblCodeBreaker.OnStart := nil;
|
||||
lblCodeBreaker.OnStop := nil;
|
||||
if lblCodeBreaker.Caption = TJvLabelCodeBreaker(lblCodeBreaker.BehaviorOptions).DecodedText then
|
||||
lblCodeBreaker.Caption := 'x6/yhjSkhHHDski"=90sd';
|
||||
// this might trigger the OnStart/OnStop events, so set to nil
|
||||
lblCodeBreaker.BehaviorOptions.Active := not lblCodeBreaker.BehaviorOptions.Active;
|
||||
lblCodeBreaker.OnStart := @DoCodeBreakStart;
|
||||
lblCodeBreaker.OnStop := @DoCodeBreakStop;
|
||||
end;
|
||||
|
||||
procedure TJvBehaviorLblMainFrm.DoCodeBreakStart(Sender: TObject);
|
||||
begin
|
||||
lblCodeBreaker.Caption := 'BREAK THE CODE';
|
||||
end;
|
||||
|
||||
procedure TJvBehaviorLblMainFrm.DoCodeBreakStop(Sender: TObject);
|
||||
begin
|
||||
ShowMessage('Congratulations! You''ve hacked the system!');
|
||||
end;
|
||||
|
||||
procedure TJvBehaviorLblMainFrm.btnAppearClick(Sender: TObject);
|
||||
begin
|
||||
lblAppearing.Alignment := taCenter;
|
||||
lblAppearing.BehaviorOptions.Active := not lblAppearing.BehaviorOptions.Active;
|
||||
end;
|
||||
|
||||
procedure TJvBehaviorLblMainFrm.btnBlinkClick(Sender: TObject);
|
||||
begin
|
||||
lblBlinking.BehaviorOptions.Active := not lblBlinking.BehaviorOptions.Active;
|
||||
end;
|
||||
|
||||
procedure TJvBehaviorLblMainFrm.btnBounceClick(Sender: TObject);
|
||||
begin
|
||||
lblBouncing.BehaviorOptions.Active := not lblBouncing.BehaviorOptions.Active;
|
||||
end;
|
||||
|
||||
procedure TJvBehaviorLblMainFrm.btnScrollClick(Sender: TObject);
|
||||
begin
|
||||
lblScrolling.BehaviorOptions.Active := not lblScrolling.BehaviorOptions.Active;
|
||||
end;
|
||||
|
||||
procedure TJvBehaviorLblMainFrm.btnSpecialClick(Sender: TObject);
|
||||
begin
|
||||
lblSpecial.BehaviorOptions.Active := not lblSpecial.BehaviorOptions.Active;
|
||||
end;
|
||||
|
||||
procedure TJvBehaviorLblMainFrm.btnTypeClick(Sender: TObject);
|
||||
begin
|
||||
lblTyping.BehaviorOptions.Active := not lblTyping.BehaviorOptions.Active;
|
||||
end;
|
||||
|
||||
procedure TJvBehaviorLblMainFrm.btnAllClick(Sender: TObject);
|
||||
var i:integer;
|
||||
begin
|
||||
for i := 0 to ControlCount -1 do
|
||||
if (Controls[i] <> btnAll) and (Controls[i] is TButton) then
|
||||
TButton(Controls[i]).Click;
|
||||
end;
|
||||
|
||||
end.
|
@ -17,7 +17,7 @@ Movable bevel and panel, ruler, exandable panel (RollOut), group header, hyperte
|
||||
"/>
|
||||
<License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/>
|
||||
<Version Major="1" Release="6"/>
|
||||
<Files Count="10">
|
||||
<Files Count="11">
|
||||
<Item1>
|
||||
<Filename Value="..\run\JvCtrls\jvhint.pas"/>
|
||||
<UnitName Value="JvHint"/>
|
||||
@ -58,6 +58,10 @@ Movable bevel and panel, ruler, exandable panel (RollOut), group header, hyperte
|
||||
<Filename Value="..\run\JvCtrls\jvofficecolorpanel.pas"/>
|
||||
<UnitName Value="JvOfficeColorPanel"/>
|
||||
</Item10>
|
||||
<Item11>
|
||||
<Filename Value="..\run\JvCtrls\jvbehaviorlabel.pas"/>
|
||||
<UnitName Value="JvBehaviorLabel"/>
|
||||
</Item11>
|
||||
</Files>
|
||||
<RequiredPkgs Count="3">
|
||||
<Item1>
|
||||
|
Binary file not shown.
1294
components/jvcllaz/run/JvCtrls/jvbehaviorlabel.pas
Normal file
1294
components/jvcllaz/run/JvCtrls/jvbehaviorlabel.pas
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user