private int createFrequencyEditor(int vPos)
{
int vertPos = vPos;
frequencyTextLabel = new Label();
frequencyTextLabel.Text = "Frequency:";
frequencyTextLabel.Location = new Point(2, vPos + 3);
frequencyTextLabel.Size = new Size(63, 13);
this.Controls.Add(frequencyTextLabel);
frequencyLabel = new Label();
frequencyLabel.DoubleClick += new EventHandler(frequencyLabel_DoubleClick);
frequencyLabel.Size = new Size(50, 20);
frequencyLabel.Location = new Point(frequencyTextLabel.Location.X + frequencyTextLabel.Size.Width, vPos);
frequencyLabel.Text = pwmFrequency.ToString();
frequencyLabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
frequencyLabel.AutoSize = false;
frequencyLabel.TextAlign = ContentAlignment.MiddleLeft;
mainTooltip.SetToolTip(frequencyLabel, "Double click to edit");
frequencyLabel.Visible = true;
this.Controls.Add(frequencyLabel);
frequencyBox = new TextBox();
frequencyBox.Size = new Size(50, 20);
frequencyBox.Location = new Point(frequencyTextLabel.Location.X + frequencyTextLabel.Size.Width, vPos);
frequencyBox.LostFocus += new EventHandler(frequencyBox_LostFocus);
frequencyBox.KeyPress += new KeyPressEventHandler(frequencyBox_KeyPress);
mainTooltip.SetToolTip(frequencyBox, "Press [Enter] to apply.");
frequencyBox.Visible = true;
this.Controls.Add(frequencyBox);
hzLabel = new Label();
hzLabel.Text = "Hz";
hzLabel.Size = new Size(20, 13);
hzLabel.Location = new Point(frequencyBox.Location.X + frequencyBox.Size.Width + 2, vPos + 3);
this.Controls.Add(hzLabel);
vertPos += frequencyBox.Size.Height + 3;
return vertPos;
}