Click here to Skip to main content
15,893,486 members
Articles / Mobile Apps / Windows Mobile

Implementing a smoothly animated ListBox

Rate me:
Please Sign up or sign in to vote.
4.94/5 (56 votes)
12 Jun 2008CPOL12 min read 405.5K   5.7K   156  
An article on creating an iPhone style ListBox.
namespace Bornander.UI.ListItems
{
    partial class FormulaOneTeam
    {
        /// <summary> 
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary> 
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Component Designer generated code

        /// <summary> 
        /// Required method for Designer support - do not modify 
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.carPicture = new System.Windows.Forms.PictureBox();
            this.teamName = new System.Windows.Forms.Label();
            this.firstDriver = new System.Windows.Forms.PictureBox();
            this.secondDriver = new System.Windows.Forms.PictureBox();
            this.firstDriverName = new System.Windows.Forms.Label();
            this.secondDriverName = new System.Windows.Forms.Label();
            this.SuspendLayout();
            // 
            // carPicture
            // 
            this.carPicture.Location = new System.Drawing.Point(3, 3);
            this.carPicture.Name = "carPicture";
            this.carPicture.Size = new System.Drawing.Size(62, 32);
            // 
            // teamName
            // 
            this.teamName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.teamName.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold);
            this.teamName.Location = new System.Drawing.Point(3, 4);
            this.teamName.Name = "teamName";
            this.teamName.Size = new System.Drawing.Size(188, 20);
            this.teamName.Text = "<teamname>";
            this.teamName.TextAlign = System.Drawing.ContentAlignment.TopRight;
            // 
            // firstDriver
            // 
            this.firstDriver.Location = new System.Drawing.Point(3, 3);
            this.firstDriver.Name = "firstDriver";
            this.firstDriver.Size = new System.Drawing.Size(32, 32);
            // 
            // secondDriver
            // 
            this.secondDriver.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.secondDriver.Location = new System.Drawing.Point(159, 3);
            this.secondDriver.Name = "secondDriver";
            this.secondDriver.Size = new System.Drawing.Size(32, 32);
            // 
            // firstDriverName
            // 
            this.firstDriverName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.firstDriverName.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular);
            this.firstDriverName.Location = new System.Drawing.Point(41, 4);
            this.firstDriverName.Name = "firstDriverName";
            this.firstDriverName.Size = new System.Drawing.Size(112, 16);
            this.firstDriverName.Text = "<driver1>";
            // 
            // secondDriverName
            // 
            this.secondDriverName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.secondDriverName.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular);
            this.secondDriverName.Location = new System.Drawing.Point(41, 19);
            this.secondDriverName.Name = "secondDriverName";
            this.secondDriverName.Size = new System.Drawing.Size(112, 16);
            this.secondDriverName.Text = "<driver2>";
            this.secondDriverName.TextAlign = System.Drawing.ContentAlignment.TopRight;
            // 
            // FormulaOneTeam
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
            this.Controls.Add(this.secondDriverName);
            this.Controls.Add(this.firstDriverName);
            this.Controls.Add(this.secondDriver);
            this.Controls.Add(this.firstDriver);
            this.Controls.Add(this.carPicture);
            this.Controls.Add(this.teamName);
            this.Name = "FormulaOneTeam";
            this.Size = new System.Drawing.Size(194, 40);
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.PictureBox carPicture;
        private System.Windows.Forms.Label teamName;
        private System.Windows.Forms.PictureBox firstDriver;
        private System.Windows.Forms.PictureBox secondDriver;
        private System.Windows.Forms.Label firstDriverName;
        private System.Windows.Forms.Label secondDriverName;
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Sweden Sweden
Article videos
Oakmead Apps Android Games

21 Feb 2014: Best VB.NET Article of January 2014 - Second Prize
18 Oct 2013: Best VB.NET article of September 2013
23 Jun 2012: Best C++ article of May 2012
20 Apr 2012: Best VB.NET article of March 2012
22 Feb 2010: Best overall article of January 2010
22 Feb 2010: Best C# article of January 2010

Comments and Discussions