update dialog and textbox