Solved

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

Posted on 2004-04-04
4
269 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

943 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

8 Experts available now in Live!

Get 1:1 Help Now