|
From: Peter T. <pe...@us...> - 2003-08-23 23:18:42
|
Update of /cvsroot/jvcl/dev/JVCL3/examples/JvBehaviorLabel
In directory sc8-pr-cvs1:/tmp/cvs-serv4702/JVCL3/examples/JvBehaviorLabel
Added Files:
JvBehaviorLabelDemo.dof JvBehaviorLabelDemo.dpr
JvBehaviorLabelDemo.res MainFrm.dfm MainFrm.pas
Log Message:
- Copied jvcl/devtools and jvcl/examples dev/JVCL3
- Copied JVCLConvert *.dat files to dev/JVCL3/converter
--- NEW FILE: JvBehaviorLabelDemo.dof ---
[Directories]
OutputDir=..\..\Bin
UnitOutputDir=..\..\Dcu
SearchPath=..\..\Source;..\..\Common
--- NEW FILE: JvBehaviorLabelDemo.dpr ---
program JvBehaviorLabelDemo;
uses
Forms,
MainFrm in 'MainFrm.pas' {Form1};
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
--- NEW FILE: JvBehaviorLabelDemo.res ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: MainFrm.dfm ---
object Form1: TForm1
Left = 197
Top = 107
BorderStyle = bsDialog
Caption = 'JvBehaviorLabel Demo'
ClientHeight = 303
ClientWidth = 573
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object lblCodeBreaker: TJvBehaviorLabel
Left = 24
Top = 18
Width = 259
Height = 22
Behavior = 'CodeBreaker'
BehaviorOptions.DecodedText = 'ENTER THE MATRIX!'
BehaviorOptions.Interval = 5
Alignment = taCenter
AutoSize = False
Caption = 'BREAK THE CODE'
Color = clBlack
Font.Charset = ANSI_CHARSET
Font.Color = clLime
Font.Height = -19
Font.Name = 'Courier New'
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
end
object lblAppearing: TJvBehaviorLabel
Left = 300
Top = 18
Width = 259
Height = 22
Behavior = 'Appearing'
BehaviorOptions.Delay = 10
BehaviorOptions.Pixels = 2
Alignment = taCenter
AutoSize = False
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
end
object lblBlinking: TJvBehaviorLabel
Left = 24
Top = 91
Width = 259
Height = 22
Behavior = 'Blinking'
BehaviorOptions.Interval = 220
Alignment = taCenter
AutoSize = False
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
end
object lblBouncing: TJvBehaviorLabel
Left = 300
Top = 91
Width = 259
Height = 22
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
end
object lblScrolling: TJvBehaviorLabel
Left = 24
Top = 163
Width = 259
Height = 22
Behavior = 'Scrolling'
BehaviorOptions.Interval = 70
Alignment = taCenter
AutoSize = False
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
end
object lblSpecial: TJvBehaviorLabel
Left = 300
Top = 163
Width = 259
Height = 22
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
end
object lblTyping: TJvBehaviorLabel
Left = 24
Top = 235
Width = 259
Height = 22
Behavior = 'Typing'
BehaviorOptions.Interval = 120
Alignment = taCenter
AutoSize = False
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
end
object Button1: TButton
Left = 38
Top = 50
Width = 80
Height = 25
Caption = '&CodeBreaker'
TabOrder = 0
OnClick = Button1Click
end
object Button2: TButton
Left = 312
Top = 48
Width = 80
Height = 25
Caption = '&Appearing'
TabOrder = 1
OnClick = Button2Click
end
object Button3: TButton
Left = 38
Top = 121
Width = 80
Height = 25
Caption = '&Blinking'
TabOrder = 2
OnClick = Button3Click
end
object Button4: TButton
Left = 312
Top = 121
Width = 80
Height = 25
Caption = 'B&ouncing'
TabOrder = 3
OnClick = Button4Click
end
object Button5: TButton
Left = 38
Top = 193
Width = 80
Height = 25
Caption = '&Scrolling'
TabOrder = 4
OnClick = Button5Click
end
object Button6: TButton
Left = 312
Top = 193
Width = 80
Height = 25
Caption = 'S&pecial'
TabOrder = 5
OnClick = Button6Click
end
object Button7: TButton
Left = 38
Top = 265
Width = 80
Height = 25
Caption = '&Typing'
TabOrder = 6
OnClick = Button7Click
end
end
--- NEW FILE: MainFrm.pas ---
unit MainFrm;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, JvBehaviorLabel;
type
TForm1 = class(TForm)
lblCodeBreaker: TJvBehaviorLabel;
Button1: TButton;
lblAppearing: TJvBehaviorLabel;
Button2: TButton;
lblBlinking: TJvBehaviorLabel;
Button3: TButton;
lblBouncing: TJvBehaviorLabel;
Button4: TButton;
lblScrolling: TJvBehaviorLabel;
Button5: TButton;
lblSpecial: TJvBehaviorLabel;
Button6: TButton;
lblTyping: TJvBehaviorLabel;
Button7: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
procedure Button7Click(Sender: TObject);
private
{ Private declarations }
procedure DoCodeBreakStart(Sender:TObject);
procedure DoCodeBreakStop(Sender:TObject);
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
lblCodeBreaker.OnStart := nil;
lblCodeBreaker.OnStop := nil;
// 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 TForm1.DoCodeBreakStart(Sender: TObject);
begin
lblCodeBreaker.Caption := 'BREAK THE CODE';
end;
procedure TForm1.DoCodeBreakStop(Sender: TObject);
begin
ShowMessage('Congratulations! You''ve hacked the system!');
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
lblAppearing.BehaviorOptions.Active := not lblAppearing.BehaviorOptions.Active;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
lblBlinking.BehaviorOptions.Active := not lblBlinking.BehaviorOptions.Active;
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
lblBouncing.BehaviorOptions.Active := not lblBouncing.BehaviorOptions.Active;
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
lblScrolling.BehaviorOptions.Active := not lblScrolling.BehaviorOptions.Active;
end;
procedure TForm1.Button6Click(Sender: TObject);
begin
lblSpecial.BehaviorOptions.Active := not lblSpecial.BehaviorOptions.Active;
end;
procedure TForm1.Button7Click(Sender: TObject);
begin
lblTyping.BehaviorOptions.Active := not lblTyping.BehaviorOptions.Active;
end;
end.
|