HorizontallyScrollingComboBox/MainForm.Designer.cs
Download
horizontallyscrollingcombobox.zip
(11.88 KB | 13 July 2010 )
Sample C# project showing how to add a horizontal scrollbar to a ComboBox in C# using the WS_HSCROLL style and CB_SETHORIZONTALEXTENT message.
Donate
If this site or its services have saved you time, please consider a donation to help with running costs and timely updates.
Contents of horizontallyscrollingcombobox.zip/HorizontallyScrollingComboBox/MainForm.Designer.cs
namespace HorizontallyScrollingComboBox
{
partial class MainForm
{
/// <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 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.comboBox1 = new HorizontallyScrollingComboBox.ComboBox();
this.comboBox2 = new HorizontallyScrollingComboBox.ComboBox();
this.comboBox3 = new HorizontallyScrollingComboBox.ComboBox();
this.SuspendLayout();
//
// comboBox1
//
this.comboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(12, 12);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(360, 21);
this.comboBox1.TabIndex = 0;
//
// comboBox2
//
this.comboBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox2.FormattingEnabled = true;
this.comboBox2.Location = new System.Drawing.Point(12, 39);
this.comboBox2.Name = "comboBox2";
this.comboBox2.Size = new System.Drawing.Size(360, 21);
this.comboBox2.TabIndex = 1;
//
// comboBox3
//
this.comboBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.comboBox3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.Simple;
this.comboBox3.FormattingEnabled = true;
this.comboBox3.IntegralHeight = false;
this.comboBox3.Location = new System.Drawing.Point(12, 66);
this.comboBox3.Name = "comboBox3";
this.comboBox3.Size = new System.Drawing.Size(360, 130);
this.comboBox3.TabIndex = 2;
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(384, 208);
this.Controls.Add(this.comboBox3);
this.Controls.Add(this.comboBox2);
this.Controls.Add(this.comboBox1);
this.Name = "MainForm";
this.Text = "Horizontally Scrolling ComboBox :: cyotek.com";
this.Load += new System.EventHandler(this.MainForm_Load);
this.ResumeLayout(false);
}
#endregion
private HorizontallyScrollingComboBox.ComboBox comboBox1;
private HorizontallyScrollingComboBox.ComboBox comboBox2;
private HorizontallyScrollingComboBox.ComboBox comboBox3;
}
}
Files
- HorizontallyScrollingComboBox
