Form1 Form1 0 0 565 390 ProgressBar Demo @ProgressBar1.setVisible(false) unnamed 11 6 ProgressBar1 Source Tree true true TreeWidget1 false true true FileSelector1 Directory StatusBar1 Spacer10 Horizontal Expanding 191 0 Spacer11 Horizontal Expanding 191 0 progressLoop @# set up a loop using loop variable named "file" @forEach(file, @exec(cd @FileSelector1.text && find * -maxdepth 0)) @# set the scale using the generated @[loopvar]_count @ProgressBar1.setMaximum(@file_count) @# show file name in statusbar @StatusBar1.setText(@file) @TreeWidget1.insertItems(@exec(cd @FileSelector1.text && find @file -name "*"), -1) @# use the generated @[loopvar]_index to update progressbar @ProgressBar1.setText(@file_index) @end ExecButton25 Get Source Tree @TreeWidget1.clear @if(@String.isEmpty(@FileSelector1.text)) @exec(kdialog --error "please select a directory, preferably not home as it will take time") @endif @if(!@String.isEmpty(@FileSelector1.text)) @ProgressBar1.setVisible(true) @progressLoop.execute @# this fails on tdewebdev 3.3.0 so leave off ".execute" @ProgressBar1.setVisible(false) @StatusBar1.setText("Source Tree Listed") @endif Button Label1 Select a directory to list it's tree ($HOME NOT recommended for time reasons)