OK, after the recent diversion of seeing just how difficult it is to code a webpage that works on the iPhone/Ipod. Concluding that it is a bit of a flaff. I'm back to the familiar world of compact framework.
As promised before, I said that I would go through the source of a user control that presented a scrolling ticker. The objective of the project was to build a re-usable smooooth control that allowed for text wider than the width of the control to scroll.
So to use the control, you can drag and drop it onto your form. To control it, use either -
this.tickerControl1.Text = "News Flash, this just in, we have received unofficial reports of a ticker working on Windows mobile";
or if you have an array of elements this works too -
string[] elems = new string[6];
elems[0]="Hello World";
elems[1] = "Another Test";
elems[2] = "Looking Good";
elems[3] = "Scrolling Well";
elems[4] = "At Last";
elems[5] = "More Stuff";
this.tickerControl1.Elements = elems;
this.tickerControl1.Speed = 100;
Lets let you have a play first, here is the project source. Please download here -
http://www.binaryrefinery.com/main/content/binary/mobileticker.zip
Next time, I'll walk through how the code works.
We'll talk soon...
Technorati Tags:
Mobile Ticker