marque text

jaikaoliver

Member
Local time
Today, 11:24
Joined
Nov 18, 2019
Messages
38
How can I make my scrolling marque text be smooth
 
If you're using a timer, maybe try a shorter time interval with shorter amount of distance for the movement.
 
It will not only depend on timing interval, but also the font you use. If you are using a non-proportional font then adding a space in front of your text will be a bigger amount than if it is a proportional font.
 
Simply, you can't! Access is not the right tool for animation.
 
see this currently active link - perhaps one of the methods suggested is better that whatever you are using at the moment

 
Instead of a scrolling marquee, if you would want "bouncing text" then you can put a label inside a rectangle. Turn off the label's borders, turn on the rectangle's borders, and then set up your form timer to move the top & left of the label by some non-zero but small fixed amount. It might not be a good idea to try to move things too fast, though, because fast timers can be a real drain on resources.

Check for that moment when the invisible borders of the label "touch" the borders of the rectangle. When it happens, change the fixed "move" amount based on which borders collided. If it was top or bottom, swap the sign of the vertical move amount. If it was left or right, swap the sign of the horizontal move amount. If you do it that way, you can move as little as one twip at the time (twips of course being the size/placement unit of all controls on the form.)

In this approach, if the label is very big with respect to the rectangle, it becomes impractical because you will not move very far before you change direction again. It will not be smooth even with a small move increment in that case.
 

Users who are viewing this thread

Back
Top Bottom