I am trying to make a rss news ticker which will display the text,the text need move from left to right
I made the the code and text is moving from left to right but after a specific time its not showing the full text,i will be adding more news from the admin pannel,each time i add the news the text is not showing after the first scroll
the below screenshot is after a specific amount of time,only a part of news is displaying
Code used
int x = -800,y=1;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
private void timer1_Tick(object sender, System.EventArgs e)
{
label1.SetBounds(x, y, 1, 1);
x++;
if(x>=800)
{
x = 4;
}
}
Code for reading xml
private void StartRssThread()
{
List<RssChannel> channels = new List<RssChannel>();
StringBuilder mergedFeed = new StringBuilder();
int mh = 0;
int ms = 0;
if (mh < 7)
{
RssFeed DaFeed = RssFeed.Read("http://shjc.ae/rss/fileName.xml");
RssChannel DaChannel = (RssChannel)DaFeed.Channels[0];
channels.Add(DaChannel);
mergedFeed.AppendFormat(" {0}: ", DaChannel.Title);
foreach (RssItem sTrm in DaChannel.Items)
{
if (ms < 10)
{
mergedFeed.AppendFormat(" {0} |", sTrm.Title);
ms++;
mh++;
}
}
}
string dafeed = mergedFeed.ToString();
mergedFeed = null;
textBox1.Invoke(new UpdateUiCallback(this.UpdateUi), new string[] { dafeed });
}