Solved

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

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi inherited method 6 80
Unique identifier on a terminal server (rdp) 4 75
TEMBEDDEDWB how can i change its user agent ? 8 84
enhance the following code 3 42
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

726 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