-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathfTestFlapLabel.pas
70 lines (58 loc) · 1.78 KB
/
fTestFlapLabel.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
unit fTestFlapLabel; // test app for component TFlapLabel
// by oMAR 2002-2020
//
//
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
FMX.Controls.Presentation, FMX.StdCtrls,
FlapLabel, FMX.Objects; // TFlapLabel
type
TFormTestFlapLabels = class(TForm)
FlapCharSet1: TFlapCharSet;
FlapLabel1: TFlapLabel;
FlapLabel2: TFlapLabel;
FlapLabel3: TFlapLabel;
btnChangeText: TButton;
cdGoDirect: TSwitch;
Label1: TLabel;
rectLabels: TRectangle;
FlapCharsetAirlines: TFlapCharSet;
FlapLabelAirline: TFlapLabel;
procedure btnChangeTextClick(Sender: TObject);
procedure cdGoDirectSwitch(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FormTestFlapLabels: TFormTestFlapLabels;
implementation
{$R *.fmx}
const
MAX_CITIES=8;
Cities: Array[0..MAX_CITIES-1] of String=
( 'SAO PAULO', // 0
'NEW YORK', // 1
'LONDON', // 2
'ROMA', // 3
'PARIS', // 4
'BERLIN', // 5
'OSASCO', // 6
'SAN FRANCISCO' // 7
);
// Change captions. This triggers transitions to the new text
procedure TFormTestFlapLabels.btnChangeTextClick(Sender: TObject);
begin
FlapLabel1.Caption := Cities[ Random(MAX_CITIES) ];
FlapLabel2.Caption := Cities[ Random(MAX_CITIES) ];
FlapLabel3.Caption := Cities[ Random(MAX_CITIES) ];
FlapLabelAirline.Caption := IntToStr( 1+Random(7) ); // change airline logo by number 1..7
end;
procedure TFormTestFlapLabels.cdGoDirectSwitch(Sender: TObject);
begin
setFlapLabelsMode( cdGoDirect.IsChecked );
end;
end.