Resource options form: fixed a problem where the text box containing the path to the file could be focused. (backport from UDB)

This commit is contained in:
spherallic 2023-04-24 23:46:18 +02:00
parent 0ff14fc5e7
commit 71fd3df676
2 changed files with 35 additions and 12 deletions

View File

@ -159,10 +159,12 @@ namespace CodeImp.DoomBuilder.Windows
this.wadlocation.ReadOnly = true;
this.wadlocation.Size = new System.Drawing.Size(292, 20);
this.wadlocation.TabIndex = 0;
//
// directorytab
//
this.directorytab.Controls.Add(this.directorylink);
this.wadlocation.TabStop = false;
this.wadlocation.Enter += new System.EventHandler(this.wadlocation_Enter);
//
// directorytab
//
this.directorytab.Controls.Add(this.directorylink);
this.directorytab.Controls.Add(this.dir_flats);
this.directorytab.Controls.Add(this.dir_textures);
this.directorytab.Controls.Add(this.browsedir);
@ -230,10 +232,12 @@ namespace CodeImp.DoomBuilder.Windows
this.dirlocation.ReadOnly = true;
this.dirlocation.Size = new System.Drawing.Size(292, 20);
this.dirlocation.TabIndex = 0;
//
// pk3filetab
//
this.pk3filetab.Controls.Add(this.pk3link);
this.dirlocation.TabStop = false;
this.dirlocation.Enter += new System.EventHandler(this.dirlocation_Enter);
//
// pk3filetab
//
this.pk3filetab.Controls.Add(this.pk3link);
this.pk3filetab.Controls.Add(this.browsepk3);
this.pk3filetab.Controls.Add(this.pk3location);
this.pk3filetab.Controls.Add(label3);
@ -276,10 +280,12 @@ namespace CodeImp.DoomBuilder.Windows
this.pk3location.ReadOnly = true;
this.pk3location.Size = new System.Drawing.Size(292, 20);
this.pk3location.TabIndex = 0;
//
// cancel
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.pk3location.TabStop = false;
this.pk3location.Enter += new System.EventHandler(this.pk3location_Enter);
//
// cancel
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(262, 260);
this.cancel.Name = "cancel";

View File

@ -230,5 +230,22 @@ namespace CodeImp.DoomBuilder.Windows
General.ShowHelp("w_resourceoptions.html");
hlpevent.Handled = true;
}
private void wadlocation_Enter(object sender, EventArgs e)
{
// Stop textbox control from getting focus
browsewad.Focus();
}
private void dirlocation_Enter(object sender, EventArgs e)
{
// Stop textbox control from getting focus
browsedir.Focus();
}
private void pk3location_Enter(object sender, EventArgs e)
{
// Stop textbox control from getting focus
browsepk3.Focus();
}
}
}