You can run a Bacis2 procedure from the button that actually creates the dialog box and all its components from scratch. Here are a few lines from one of mine. Do a search in your docs for "ui_create_object".

George

-- delete any existing one
if ui_object_field_exists(ui, !library_dialog)
ui_destroy_object(ui!library_dialog)
endif