Debugger: Hex Editor - Give keyboard focus to the hex editor when form is opened

This commit is contained in:
Sour 2019-12-23 16:49:54 -05:00
parent 32f5ece894
commit 1d03eb7859
2 changed files with 11 additions and 0 deletions

View file

@ -68,6 +68,11 @@ namespace Mesen.GUI.Debugger.Controls
mnuViewInMemoryType.InitShortcut(this, nameof(DebuggerShortcutsConfig.MemoryViewer_ViewInMemoryType));
}
public new void Focus()
{
this.ctrlHexBox.Focus();
}
public byte[] GetData()
{
return this._byteProvider != null ? this._byteProvider.Bytes.ToArray() : new byte[0];

View file

@ -99,6 +99,12 @@ namespace Mesen.GUI.Debugger
this.InitShortcuts();
}
protected override void OnShown(EventArgs e)
{
base.OnShown(e);
ctrlHexViewer.Focus();
}
protected override void OnFormClosing(FormClosingEventArgs e)
{
base.OnFormClosing(e);