Looking to make a small desktop app to show news in a ticker line, similar to what the TV news channels have on the bottom of the screen or a stock market ticker.
I have looked around for tips on how to approach this, but haven’t found anything but bits and pieces here and there. A a newbie I am unsure on where to start.
Any tips would be appreciated.
I’m thinking the app should have these features to start with.
- horizontal scroll with variable scroll speed.
- stylable font, size, color and background color.
- Floating on top of other windows or not.
- Option to snap to top or bottom of the screen with multiple montor support, ie. display on a certain monitor.
All this possible for a newbie?
I’ve got the RSS part working, but I would need to store the sources in a database and it would be nice to be able to style each source in the ticker.
The database I should be able to get working, it’s the interface and scrolling part that seems difficult.
Hope to get some good pointers to ge me started, maybe some links to examples I can study and learn from.
Use a Canvas to draw the text and a Timer to tell the Canvas to redraw after adjusting the text position.
Here’s a quick project that shows one way you can do it: ScrollingText project
Thank you very much, Paul. That helped immensely.
I now got it running in a cycle at the top of my second monitor.
Now for the rest
I tried using your example (which works great on Mac) on Windows, but it isn’t working on it.
Can you please help?
Open up the documentation for Graphics, take a look at the issue you see in the project, and sit and think for a minute or two. Here’s the link for the Graphics documentation: http://documentation.xojo.com/index.php/Graphics
If you’re still stuck after following Tim’ advice, I’ve updated the project because I feel bad that I didn’t test it on Windows.
In this case, all that is needed is to turn ON the DoubleBuffer property for the TextCanvas.
Thanks Paul for your advice and sorry to all others if my question annoyed them.
And I reckon doublebuffer it’s a canvas property.
Sorry if that came across more rude than I meant it to be. You just need to show that you’ve tried to solve the issue yourself next time. Something like “I tried _______ but it didn’t work the way I thought it would.”
We’re all more than happy to help, but only if you’re ready to put in the work to learn!
I am using the example provided here but I added a slider and am using the slider to change the timer period so I can speed up and slow down the scrolling. It works well except the scrolling stops while I am using the slider and the scrolling is choppy at when the period os to short.
Is there a good way to create scrolling where the user can use a slider to control the speed with a slide and the scrolling stays smooth?