# a file selection box, with file selected printed
xtAppInitialize -class Program

xmFileSelectionBox .file managed
.file okCallback get_selection

proc get_selection {} {
    .file getValues -dirSpec x
    puts stdout "Selected: $x"
}

. realizeWidget

. mainLoop
