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:
parent
18bcc08e1d
commit
721dcf4578
8 changed files with 111 additions and 47 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue