I have the following code:
DialogInput[{name = "", id = ""},
Grid[{{"Name: ",
InputField[Dynamic[name], String,
FieldHint -> "Enter the name"]}, {"ID: ",
InputField[Dynamic[id], String,
FieldHint -> "Enter the three-digit ID"]}, {"",
Grid[{{Button["OK", DialogReturn[{name, id}],
ImageSize -> Automatic],
Button["Cancel", DialogReturn[{}],
ImageSize -> Automatic]}}]}}],
WindowTitle -> "Add New Record"];
When I execute the statement -- either from within a notebook or via code produced in Workbench -- the dialog pops up, but there is no focus on any control, so I have to use the mouse before I can start typing.
Is there a way to set the focus to the first InputField[], or, better, any control on the DialogInput[]?
Thanks in advance
Brad