mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
Fixed the Hotkey selection text
Works fine now. No more errant selections.
This commit is contained in:
parent
43374ff1b2
commit
c5121702b2
3
DisplayMagician/UIForms/HotkeyForm.Designer.cs
generated
3
DisplayMagician/UIForms/HotkeyForm.Designer.cs
generated
@ -42,8 +42,10 @@ namespace DisplayMagician.UIForms
|
||||
// txt_hotkey
|
||||
//
|
||||
this.txt_hotkey.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txt_hotkey.HideSelection = false;
|
||||
this.txt_hotkey.Location = new System.Drawing.Point(86, 153);
|
||||
this.txt_hotkey.Name = "txt_hotkey";
|
||||
this.txt_hotkey.ReadOnly = true;
|
||||
this.txt_hotkey.Size = new System.Drawing.Size(270, 26);
|
||||
this.txt_hotkey.TabIndex = 1;
|
||||
this.txt_hotkey.KeyDown += new System.Windows.Forms.KeyEventHandler(this.OnKeyDown);
|
||||
@ -153,6 +155,7 @@ namespace DisplayMagician.UIForms
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Choose a Hotkey";
|
||||
this.Activated += new System.EventHandler(this.HotkeyForm_Activated);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
@ -49,7 +49,8 @@ namespace DisplayMagician.UIForms
|
||||
//hks = new HotkeySelector();
|
||||
//hks.EmptyHotkeyText = "";
|
||||
//hks.Enable(txt_hotkey);
|
||||
this.ActiveControl = txt_hotkey;
|
||||
//this.ActiveControl = txt_hotkey;
|
||||
//txt_hotkey.DeselectAll();
|
||||
}
|
||||
|
||||
#pragma warning disable CS3001 // Argument type is not CLS-compliant
|
||||
@ -62,9 +63,6 @@ namespace DisplayMagician.UIForms
|
||||
myHotkey = hotkeyToEdit;
|
||||
Refresh(txt_hotkey);
|
||||
|
||||
this.ActiveControl = txt_hotkey;
|
||||
txt_hotkey.DeselectAll();
|
||||
|
||||
if (!String.IsNullOrEmpty(hotkeyHeading))
|
||||
{
|
||||
if (hotkeyHeading.Length > 60)
|
||||
@ -91,7 +89,8 @@ namespace DisplayMagician.UIForms
|
||||
this.DialogResult = DialogResult.None;
|
||||
txt_hotkey.Text = "";
|
||||
myHotkey = Keys.None;
|
||||
this.ActiveControl = txt_hotkey;
|
||||
//this.ActiveControl = txt_hotkey;
|
||||
//txt_hotkey.DeselectAll();
|
||||
}
|
||||
|
||||
private void btn_save_Click(object sender, EventArgs e)
|
||||
@ -282,6 +281,11 @@ namespace DisplayMagician.UIForms
|
||||
_invalidKeyCombination.Add(Keys.Control | Keys.Delete);
|
||||
}
|
||||
|
||||
|
||||
private void HotkeyForm_Activated(object sender, EventArgs e)
|
||||
{
|
||||
//this.ActiveControl = txt_hotkey;
|
||||
txt_hotkey.Focus();
|
||||
txt_hotkey.DeselectAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user