Click here to Skip to main content
15,897,187 members
Articles / Programming Languages / C#

Data Entry Control

Rate me:
Please Sign up or sign in to vote.
4.86/5 (23 votes)
31 Jan 2011CPOL3 min read 50.9K   1.8K   47  
Quick reflection based data entry control in one line of code
namespace DataEntryControlTest
{
    partial class PropertyItemControl
    {
        /// <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.Label = new System.Windows.Forms.Label();
            this.Validation = new System.Windows.Forms.Label();
            this.Panel = new System.Windows.Forms.Panel();
            this.SuspendLayout();
            // 
            // Label
            // 
            this.Label.Dock = System.Windows.Forms.DockStyle.Left;
            this.Label.Location = new System.Drawing.Point(0, 0);
            this.Label.Name = "Label";
            this.Label.Size = new System.Drawing.Size(136, 30);
            this.Label.TabIndex = 0;
            this.Label.Text = "label1";
            this.Label.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // Validation
            // 
            this.Validation.Dock = System.Windows.Forms.DockStyle.Right;
            this.Validation.Location = new System.Drawing.Point(611, 0);
            this.Validation.Name = "Validation";
            this.Validation.Size = new System.Drawing.Size(11, 30);
            this.Validation.TabIndex = 1;
            this.Validation.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // Panel
            // 
            this.Panel.Dock = System.Windows.Forms.DockStyle.Fill;
            this.Panel.Location = new System.Drawing.Point(136, 0);
            this.Panel.Name = "Panel";
            this.Panel.Padding = new System.Windows.Forms.Padding(0, 6, 0, 0);
            this.Panel.Size = new System.Drawing.Size(475, 30);
            this.Panel.TabIndex = 2;
            // 
            // PropertyItemControl
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Controls.Add(this.Panel);
            this.Controls.Add(this.Validation);
            this.Controls.Add(this.Label);
            this.Name = "PropertyItemControl";
            this.Size = new System.Drawing.Size(622, 30);
            this.ResumeLayout(false);

        }

        #endregion

        public System.Windows.Forms.Label Label;
        public System.Windows.Forms.Label Validation;
        public System.Windows.Forms.Panel Panel;
    }
}

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
Architect -
United Kingdom United Kingdom
Mehdi first started programming when he was 8 on BBC+128k machine in 6512 processor language, after various hardware and software changes he eventually came across .net and c# which he has been using since v1.0.
He is formally educated as a system analyst Industrial engineer, but his programming passion continues.

* Mehdi is the 5th person to get 6 out of 7 Platinum's on Code-Project (13th Jan'12)
* Mehdi is the 3rd person to get 7 out of 7 Platinum's on Code-Project (26th Aug'16)

Comments and Discussions