#!/usr/local/bin/wish # The GUI of our fileselector. proc fileselector { top } { # First create the widget hierarchy: toplevel $top frame $top.fileframe -relief raised -bd 1 frame $top.maskframe -relief raised -bd 1 frame $top.pathframe -relief raised -bd 1 frame $top.boxframe -relief raised -bd 1 frame $top.buttonframe -relief raised -bd 1 entry $top.fileframe.fileentry -width 40 -relief sunken -bg white entry $top.pathframe.pathentry -width 40 -relief sunken -bg white entry $top.maskframe.maskentry -width 40 -relief sunken -bg white label $top.fileframe.filelabel -width 5 -text "File:" label $top.maskframe.masklabel -width 5 -text "Mask:" label $top.pathframe.pathlabel -width 5 -text "Path:" listbox $top.boxframe.box -width 40 -height 10 scrollbar $top.boxframe.scroll button $top.buttonframe.ok -text "Ok" button $top.buttonframe.cancel -text "Cancel" # Pack all widgets in the window: pack $top.fileframe -fill x pack $top.maskframe -fill x pack $top.pathframe -fill x pack $top.boxframe -fill both -expand true pack configure $top.buttonframe -before $top.boxframe -fill x -side bottom pack $top.fileframe.filelabel -side left -padx 10 -pady 10 pack $top.maskframe.masklabel -side left -padx 10 -pady 10 pack $top.pathframe.pathlabel -side left -padx 10 -pady 10 pack $top.fileframe.fileentry -side right -padx 10 -pady 10 -fill x -expand true pack $top.maskframe.maskentry -side right -padx 10 -pady 10 -fill x -expand true pack $top.pathframe.pathentry -side right -padx 10 -pady 10 -fill x -expand true pack $top.boxframe.scroll -side right -fill y -expand false pack $top.boxframe.box -side left -fill both -expand true pack $top.buttonframe.cancel -side right -padx 10 -pady 10 pack $top.buttonframe.ok -side left -padx 10 -pady 10 } fileselector .f