Click here to Skip to main content
12,555,044 members (61,244 online)
Click here to Skip to main content


14 bookmarked

ReadOnly Combobox

, 7 May 2007
Creating simple, attractive, read-only comboboxes
namespace RoCombobox
    partial class Form1
        /// <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))

        #region Windows Form 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.checkBox1 = new System.Windows.Forms.CheckBox();
            this.roCheckBox1 = new RoCombobox.RoCheckBox();
            this.roComboBox1 = new RoCombobox.RoComboBox();
            // checkBox1
            this.checkBox1.AutoSize = true;
            this.checkBox1.Location = new System.Drawing.Point(73, 53);
            this.checkBox1.Name = "checkBox1";
            this.checkBox1.Size = new System.Drawing.Size(149, 17);
            this.checkBox1.TabIndex = 1;
            this.checkBox1.Text = "Make Combobox readonly";
            this.checkBox1.UseVisualStyleBackColor = true;
            this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
            // roCheckBox1
            this.roCheckBox1.AutoSize = true;
            this.roCheckBox1.Location = new System.Drawing.Point(73, 162);
            this.roCheckBox1.Name = "roCheckBox1";
            this.roCheckBox1.ReadOnly = false;
            this.roCheckBox1.Size = new System.Drawing.Size(138, 17);
            this.roCheckBox1.TabIndex = 2;
            this.roCheckBox1.Text = "  my readonly checkbox";
            this.roCheckBox1.UseVisualStyleBackColor = true;
            // roComboBox1
            this.roComboBox1.FormattingEnabled = true;
            this.roComboBox1.Items.AddRange(new object[] {
            "Item 1",
            "Item 2",
            "Item 3"});
            this.roComboBox1.Location = new System.Drawing.Point(73, 122);
            this.roComboBox1.Name = "roComboBox1";
            this.roComboBox1.ReadOnly = false;
            this.roComboBox1.Size = new System.Drawing.Size(146, 21);
            this.roComboBox1.TabIndex = 0;
            // Form1
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(292, 266);
            this.Name = "Form1";
            this.Text = "Form1";



        private RoComboBox roComboBox1;
        private System.Windows.Forms.CheckBox checkBox1;
        private RoCheckBox roCheckBox1;

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.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Software Developer (Senior) Farmad
Belgium Belgium
After my studies i started as a technician for repair of consumer electronics at the philips company in Brussels, more specific laser, camcorder and PC products. This was not really software related but it gave me good knowledge about global architectures and bus systems.

In 1998 i started as delphi developer for 9 years, mainly for developing realtime auction software. So i’ve done a lot of programming for serial,network and internet communication, audiostreaming included. In the same period i’ve developed databases for those multitier applications on a MSSQL server.

August 2006 i’ve switched to the C# .net environment, writing applications for a company providing access control solutions. Though the developing was mainly for enduser software, i also had to write automatisation software.

After five years as a software test engineer at Niko nv, i switched back to development. As a dotnet c# developer at farmad i'm using the latest technologies : vs2013, dotnet 4.5, Linq in combination with devexpress components aswel for GUI as for ORM (xpo)

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.161021.1 | Last Updated 7 May 2007
Article Copyright 2007 by topcatalpha
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid