Solved

general help needed with using freeware components (text scorller in particular)

Posted on 2004-04-04
4
265 Views
Last Modified: 2010-04-04
I am pretty new to using freeware components in delphi and I am really struggling to get a single one working.  The biggest problem is that the documentation is so sparse and assumes you have all the essential knowledge in the first place, but it's starting to bug me know.

I've been trying to use some freeware text scrollers for my about screen, because I figured it would be faster doing that then writing my own, and so far i've wasted about 3 hours getting numerous ones to work with no success.

so the one i am trying to get working now is

TbspRunningText = class(TCustomlabel)
  private
       { Private-Deklarationen }
       FBitmap: TBitmap;
       FTimer: TTimer;
       FCurCycle: Integer;
       FActive: Boolean;
       FDirection: TbspRunDirection;
       FStyleLabel: TbspRunFontStyle;
       FLayout: TbspRunTextLayout;
       FSpeed: Integer;
       FNumRepeat: Word;                   //number of repeat cycles
       FContinuous: Boolean;            // same that FNumRepeat = infinity
       FSteps: Integer;           // number of steps
       CurrentStep: Integer;      // current step when running
       FRunCaption: string;            // text to show running
       procedure SetActive(Value: Boolean);
       procedure SetDirection(Value: TbspRunDirection);
       procedure SetStyle(Value: TbspRunFontStyle);
       procedure SetSteps(Value: Integer);
       procedure SetSpeed(Value: Integer);
       procedure SetLayout(Value: TbspRunTextLayout);
  protected
       { Protected-Deklarationen }
       procedure TimerExpired(Sender: TObject);
       procedure DrawRunText;
       // hide following properties
       property Autosize;
       property WordWrap;
       property Caption;
  public
       { Public-Deklarationen }
       constructor Create(AOwner: TComponent); override;
       destructor Destroy; override;
       procedure Paint; override;


it all seems so simple yet i am missing something fatal.

var
            scroll : TbspRunningText;
begin

 scroll.create(label1);

 With Scroll do
 begin
  active := true;
  Continuous := true;
  Runningcaption := '    hello there   ';
 end;

here's pretty much what i've done.  I figure i have to create the scroll on the label i want to use and this compiles fine, accept i get an access violation message the minute i get past the create(label1) line.

This seems to be my biggest problem with all the components i try is i get an access violation.

Have i got the right idea???  can someone provide an answer?

thanks in advnace
0
Comment
Question by:maidenbeast666
  • 2
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
mokule earned 50 total points
ID: 10751727
Try
Scroll := TbspRunningText.Create(label1);

in place of

 scroll.create(label1);

0
 

Author Comment

by:maidenbeast666
ID: 10752393
yeah that stopped the error but now i get

COntrol bspRunningText has no parent window
0
 
LVL 17

Expert Comment

by:mokule
ID: 10752636
set parent window
Scroll.Parent := Form1;     //  Your Form or Panel or something like that
0
 

Author Comment

by:maidenbeast666
ID: 10753339
its not scrolling :P  but thast not your fault.  my errors are gone.  thanks.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now