How to set a default string in a dialog box?

Similar to here: