my $mp = MainWindow->new(title=>"Project List"); my $mp1 = $mp -> Frame; $mp1->Label( -text=>'For Help...', -font => 'bold', -relief => 'sunken', -height => '1.5', -background => 'lightblue')->pack(-side=>"top",-fill=>"both",-anchor=>"w"); $mp1 -> pack; my $mp2 = $mp -> Frame; $mp2->Button( -text => 'Cancel', -background => 'lightgreen', -command =>\&Escape)->pack(-side=>"right",qw/-padx 50 -pady 2/); $mp2->Button( -text => 'OK', -background => 'lightgreen', -command =>[$mp => 'destroy'])->pack(-side=>"right",qw/-ipadx 8 -pady 2/); $mp2 -> pack; my $mp3 = $mp1 -> Frame; $listbox = $mp3->Scrolled("Listbox", "-width" => 35, "-height" => 20, "-scrollbars" => 'sw', "-background" => 'lightyellow'); #open(FILE,"K:\\SHIHAN\\ENV_LIST.txt") or warn "$!\n"; open(FILE,"K:\\Project_List.txt") or warn "$!\n"; while ($line=) { chomp ($line); if ( $line =~ '^[1-9]') { $listbox-> insert('end',"$line");} } close (FILE); $listbox-> bind ('',\&getNumFlow); $listbox-> bind ('',sub{getNumFlow(); $mp->destroy;}); $listbox->configure(-yscrollcommand =>['set',$scroll]); $listbox->pack(-side=>'left',-fill => 'both'); $text2 = $mp3->Text('-width'=>40,'-height'=>2)->pack; $mp3 -> pack; MainLoop;