0
votes

There are moments that I need to present a message for the user and the length of the message is bigger than the space available.

It does not matter which control to be used, I am looking for a way to know when the text is not fully visible and how to apply a scrolling effect (to be more precise scroll the text to the left slowly until all the hidden text is shown and repeat all over again forever).

I am using Delphi XE7.1

1
Perhaps some help from this link,Firemonkey Marquee ScrollLabe.LU RD
@LURD very intersting, I will give a try on that, if that works is all that I need, or almost.... I let you know then you post as answer, unless someone comes with something even better... thanksEduardo Elias
@LURD and Eduardo, note however the text at the bottom of the page that says it works correctly only on Windows. On Android and iOS it flows beyond the borders.Tom Brunberg
@TomBrunberg Thanks to let me know... Actually I need it working on Android either. So I will need to see the result if it is acceptable.Eduardo Elias
Why don't you add a memo? And use the align propery to get the full width of your device example align.top or align.bottom. Memo will resize it self when you run out of space!Remi

1 Answers

0
votes

Scrolling marquee in Delphi XE7 using standard RTL controls:

procedure TForm1.Button1Click(Sender: TObject);
begin
 FloatAnimation1.Enabled := True;
 FloatAnimation1.StartValue := Form1.Width;
 FloatAnimation1.StopValue := 0-Label1.Width;
end;


object Label1: TLabel
AutoSize = True
Position.X = 240.000000000000000000
Position.Y = 232.000000000000000000
Size.Width = 37.000000000000000000
Size.Height = 16.000000000000000000
Size.PlatformDefault = False
TextSettings.WordWrap = False
Text = 'Label1'
object FloatAnimation1: TFloatAnimation
  Duration = 1.000000000000000000
  Loop = True
  PropertyName = 'Position.X'
  StartValue = 0.000000000000000000
  StartFromCurrent = True
  StopValue = 0.000000000000000000
end
end
object Button1: TButton
 Position.X = 248.000000000000000000
 Position.Y = 312.000000000000000000
 TabOrder = 1
 Text = 'Button1'
 OnClick = Button1Click
end