Ok here what am trying to do, when its scrolling left, I want to get the full length of the lblmarquee caption and then when it scrolls to the end of the last letter or caption it will then auto change to right scroll and then back to left so on, so it bouncing left and right.

  txt := lblMarquee.Caption;

  if rgDirection.ItemIndex = 0 then //left
     lblMarquee.Caption := Copy(txt, 2, length(txt)-1) + Copy(txt,1,1)
   else //right
     lblMarquee.Caption := Copy(txt,length(txt)-1,1) + Copy(txt, 1, length(txt)-1);

any one got idea ideas thanks alot

There is a nice Marquee component at http://www.delphiarea.com/products/delphi-components/marquee/
It can scroll left or write. All you would need to do is handle its onWrap event and swap its direction, like this:

procedure TMainForm.MarqueeWrap(Sender: TObject);
begin
  if Marquee.BiDiMode = bdLeftToRight then
    Marquee.BiDiMode := bdRightToLeft
  else
    Marquee.BiDiMode := bdLeftToRight;
  Marquee.Reset;
end;

The component is really nice because you can scroll HTML text & images so it can look much better than a label.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.