C2017-025 logic added so that dropdown list opens when you click anywhere on the dropdown control

This commit is contained in:
John Jenko 2017-06-21 12:41:22 +00:00
parent dc6468155f
commit c1c5bfd081
2 changed files with 16 additions and 6 deletions

View File

@ -114,46 +114,52 @@ namespace VEPROMS
// //
// lblWarning // lblWarning
// //
this.lblWarning.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblWarning.BackColor = System.Drawing.Color.PaleGoldenrod; this.lblWarning.BackColor = System.Drawing.Color.PaleGoldenrod;
this.lblWarning.ForeColor = System.Drawing.Color.Red; this.lblWarning.ForeColor = System.Drawing.Color.Red;
this.lblWarning.Location = new System.Drawing.Point(5, 175); this.lblWarning.Location = new System.Drawing.Point(5, 175);
this.lblWarning.Name = "lblWarning"; this.lblWarning.Name = "lblWarning";
this.lblWarning.Size = new System.Drawing.Size(290, 38); this.lblWarning.Size = new System.Drawing.Size(290, 38);
this.lblWarning.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right;
this.lblWarning.TabIndex = 4; this.lblWarning.TabIndex = 4;
this.lblWarning.Visible = false; this.lblWarning.Visible = false;
// //
// lblDescription // lblDescription
// //
this.lblDescription.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.lblDescription.Location = new System.Drawing.Point(5, 66); this.lblDescription.Location = new System.Drawing.Point(5, 66);
this.lblDescription.Name = "lblDescription"; this.lblDescription.Name = "lblDescription";
this.lblDescription.Size = new System.Drawing.Size(290, 109); this.lblDescription.Size = new System.Drawing.Size(290, 109);
this.lblDescription.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right | System.Windows.Forms.AnchorStyles.Bottom;
this.lblDescription.TabIndex = 3; this.lblDescription.TabIndex = 3;
// //
// lblCaption // lblCaption
// //
this.lblCaption.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblCaption.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblCaption.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblCaption.Location = new System.Drawing.Point(5, 48); this.lblCaption.Location = new System.Drawing.Point(5, 48);
this.lblCaption.Name = "lblCaption"; this.lblCaption.Name = "lblCaption";
this.lblCaption.Size = new System.Drawing.Size(290, 19); this.lblCaption.Size = new System.Drawing.Size(290, 19);
this.lblCaption.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
this.lblCaption.TabIndex = 2; this.lblCaption.TabIndex = 2;
this.lblCaption.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblCaption.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// cbxAdminTools // cbxAdminTools
// //
this.cbxAdminTools.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cbxAdminTools.FlatStyle = System.Windows.Forms.FlatStyle.Standard; this.cbxAdminTools.FlatStyle = System.Windows.Forms.FlatStyle.Standard;
this.cbxAdminTools.FormattingEnabled = true; this.cbxAdminTools.FormattingEnabled = true;
this.cbxAdminTools.Location = new System.Drawing.Point(5, 27); this.cbxAdminTools.Location = new System.Drawing.Point(5, 27);
this.cbxAdminTools.Name = "cbxAdminTools"; this.cbxAdminTools.Name = "cbxAdminTools";
this.cbxAdminTools.Size = new System.Drawing.Size(290, 21); this.cbxAdminTools.Size = new System.Drawing.Size(290, 21);
this.cbxAdminTools.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
this.cbxAdminTools.TabIndex = 1; this.cbxAdminTools.TabIndex = 1;
this.cbxAdminTools.WatermarkBehavior = DevComponents.DotNetBar.eWatermarkBehavior.HideNonEmpty; this.cbxAdminTools.WatermarkBehavior = DevComponents.DotNetBar.eWatermarkBehavior.HideNonEmpty;
this.cbxAdminTools.WatermarkFont = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cbxAdminTools.WatermarkFont = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cbxAdminTools.WatermarkText = "Select Adminstrative Tool"; this.cbxAdminTools.WatermarkText = "Select Adminstrative Tool";
this.cbxAdminTools.SelectedIndexChanged += new System.EventHandler(this.cbxAdminTools_SelectedIndexChanged); this.cbxAdminTools.SelectedIndexChanged += new System.EventHandler(this.cbxAdminTools_SelectedIndexChanged);
this.cbxAdminTools.Click += new System.EventHandler(this.cbxAdminTools_Click);
// //
// label1 // label1
// //
@ -291,13 +297,14 @@ namespace VEPROMS
// //
// dtpTime // dtpTime
// //
this.dtpTime.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dtpTime.CustomFormat = "HH:mm"; this.dtpTime.CustomFormat = "HH:mm";
this.dtpTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom; this.dtpTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dtpTime.Location = new System.Drawing.Point(129, 9); this.dtpTime.Location = new System.Drawing.Point(129, 9);
this.dtpTime.Name = "dtpTime"; this.dtpTime.Name = "dtpTime";
this.dtpTime.ShowUpDown = true; this.dtpTime.ShowUpDown = true;
this.dtpTime.Size = new System.Drawing.Size(140, 20); this.dtpTime.Size = new System.Drawing.Size(140, 20);
this.dtpTime.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
this.dtpTime.TabIndex = 4; this.dtpTime.TabIndex = 4;
// //
// dtpDate // dtpDate
@ -345,7 +352,6 @@ namespace VEPROMS
// //
// txtResults // txtResults
// //
//this.txtResults.AcceptsReturn = true;
this.txtResults.Dock = System.Windows.Forms.DockStyle.Fill; this.txtResults.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtResults.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txtResults.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtResults.Location = new System.Drawing.Point(0, 52); this.txtResults.Location = new System.Drawing.Point(0, 52);

View File

@ -894,6 +894,10 @@ namespace VEPROMS
{ {
pnlLater.Enabled = chkLater.Checked; pnlLater.Enabled = chkLater.Checked;
} }
private void cbxAdminTools_Click(object sender, EventArgs e)
{
cbxAdminTools.DroppedDown = true; // expand dropdown list if user clicks anywhere on the dropdown control
}
} }
public class AdminTool : IComparable<AdminTool> public class AdminTool : IComparable<AdminTool>
{ {