Make Focus work better

don't return a bool, assert that there is a parent
Set focus on save as window to text field.
Set focus to text field on terminal window.
This commit is contained in:
Lars Brubaker 2015-07-29 16:31:24 -07:00
parent 18bcc08e1d
commit 721dcf4578
8 changed files with 111 additions and 47 deletions

View file

@ -102,18 +102,7 @@ namespace MatterHackers.MatterControl
topToBottom.AddChild(buttonRow);
ShowAsSystemWindow();
}
bool firstDraw = true;
public override void OnDraw(Graphics2D graphics2D)
{
if (firstDraw)
{
folderNameWidget.Focus();
firstDraw = false;
}
base.OnDraw(graphics2D);
UiThread.RunOnIdle(folderNameWidget.Focus);
}
private void ActualTextEditWidget_EnterPressed(object sender, KeyEventArgs keyEvent)