Scrolling when text to long.

Feb 8, 2013 at 10:31 AM
Is it possible to scroll text when it's to long and if the text fits the screen than no scolling?
How can I do this?
Feb 8, 2013 at 12:38 PM
Hello slimmeke,

The LcdGdiScrollViewer with AutoScrollX = true does exactly that, please see the samples. Are you having problem with it?
Feb 8, 2013 at 12:48 PM
I got a problem with that. If you do autoscrollX= true than the text will always scrolling (also when the text is small enough for the screen). And the long text that not fit on the screen doesn't show the full text (part of the begin of the text is missing.
Feb 8, 2013 at 12:59 PM
There seems to be a problem with the placement of your controls: if you replace the scrolling text in the sample by one that fits on the screen (such as simply "Hello World"), there is no scrolling at all, even with AutoScrollX = true, which is exactly what you want. Please make sure that the alignments and margins of your controls are correct.
Feb 8, 2013 at 1:15 PM
Edited Feb 8, 2013 at 1:21 PM
Ok I'm have progress. But now I have nice scrolling text but when the text is to small the text will show in the left of the screen and I will get it in the center of the screen.
HOw can I realise this? I got following code:
LcdGdiScrollViewer titleScroll = new LcdGdiScrollViewer(titleGdi);
            titleScroll.AutoScrollX = true;
            titleScroll.AutoScrollY = false;
            titleScroll.AutoScrollSpeedY = 0;
            titleScroll.Size = new SizeF(160, 8);
             titleScroll.HorizontalAlignment = LcdGdiHorizontalAlignment.Stretch;
            titleScroll.Margin = new MarginF(0, -1, 0, 0);
Feb 8, 2013 at 1:25 PM
Make sure that titleGdi also has an HorizontalAlignment of LcdGdiHorizontalAlignment.Center, it should do the trick.
Feb 8, 2013 at 1:28 PM
Ok tnx for your support. Now everyting works :) :).
Feb 8, 2013 at 2:13 PM
Ok It doesn't work. If I set titleGdi.HorizontalAlignment =LcdGdiHorizontalAlignment.Center than the beginning of the text will not show. But when the text is short than it shows good. Only this little problem remains :(.
Feb 9, 2013 at 7:46 AM
Can someone help me with this problem.

My normal text is in the middle of the screen. And if a set a longer text that must scroll. The text scrolls but the beginning of the text is not showing. I have changed the margin but without any result. And with the margin my normal text (that doesn't scroll) is not anymore in the middle of the screen.