You've already forked lazarus-ccr
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8311 8e941d3f-bd1b-0410-a28a-d453659cc2b4
62 lines
1.1 KiB
ObjectPascal
62 lines
1.1 KiB
ObjectPascal
unit Unit1;
|
|
|
|
{$mode objfpc}{$H+}
|
|
|
|
interface
|
|
|
|
// Both .lrs and .res files can be used.
|
|
// Activate the corresponding define for testing.
|
|
{$DEFINE LRS_RESOURCE}
|
|
{$DEFINE RES_RESOURCE}
|
|
|
|
uses
|
|
Classes, SysUtils, FileUtil, ScrollingText, Forms, Controls, Graphics,
|
|
Dialogs, Buttons, StdCtrls, LResources, ComCtrls;
|
|
|
|
type
|
|
|
|
{ TForm1 }
|
|
|
|
TForm1 = class(TForm)
|
|
BitBtn1: TBitBtn;
|
|
Button1: TButton;
|
|
ScrollingText1: TScrollingText;
|
|
TrackBar1: TTrackBar;
|
|
procedure Button1Click(Sender: TObject);
|
|
procedure TrackBar1Change(Sender: TObject);
|
|
private
|
|
{ private declarations }
|
|
public
|
|
{ public declarations }
|
|
end;
|
|
|
|
var
|
|
Form1: TForm1;
|
|
|
|
implementation
|
|
|
|
{$R *.lfm}
|
|
{$IFDEF RES_RESOURCE}
|
|
{$R scrolltext.res}
|
|
{$ENDIF}
|
|
|
|
{ TForm1 }
|
|
|
|
procedure TForm1.Button1Click(Sender: TObject);
|
|
begin
|
|
ScrollingText1.Active:=NOT ScrollingText1.Active;
|
|
end;
|
|
|
|
procedure TForm1.TrackBar1Change(Sender: TObject);
|
|
begin
|
|
ScrollingText1.ScrollSpeed := TScrollSpeed(Trackbar1.Position);
|
|
end;
|
|
|
|
initialization
|
|
{$IFDEF LRS_RESOURCE}
|
|
{$I scrolltext.lrs}
|
|
{$ENDIF}
|
|
|
|
end.
|
|
|