page nmap3 does not exist at /home/thefinn/workspace/Rasputin/nmap.module.pl line 57
The code is working fine other than the button to destroy the tab.
Any new hints on counting up tabs and dealing with tab methods welcome.
Thanks,
Peter.
sub nmap_scan_dialog { $tabcount++; $mytab="nmap$tabcount"; $nmap{$tabcount}=$tabsinside->add($mytab,-label => "Nmap Scan")->p +ack(); $tabsinside->Resize(); #Bug workaround. $thistab=$mytab->Frame(-background => 'black', -foreground => '#00ff00')->pack(-side => 'top', -fill => 'x'); $thistab->Label(-text => 'New Nmap Scan', -background => 'black', -foreground => '#00ff00')->pack(); $nsleft=$thistab->Frame(-background => 'black', -foreground => '#00ff00')->pack(-side=> 'left', -pady=>9, -padx => +8); $nsask1=$nsleft->Label (-text => 'Network Name:', -background => ' +black', -foreground => '#00ff00')->pack(); $nsask2=$nsleft->Label (-text => 'Target Adddress:', -background = +> 'black', -foreground => '#00ff00')->pack(); $nsask3=$nsleft->Label (-text => 'Extra Nmap Flags:', -background +=> 'black', -foreground => '#00ff00')->pack(); $nsright=$thistab->Frame(-background => 'black', -foreground => '#00ff00')->pack(-side => 'left', -pady => 2, -padx +=>15); $nsask1=$nsright->Entry (-background => '#00FF00', -foreground => 'black', -width=>12, -borderwidth=>2, -relief => 's +unken')->pack(); $nsask2=$nsright->Entry (-background => '#00ff00', -foreground => 'black', -width=>12, -borderwidth=>2, -relief => 's +unken')->pack(); $nsask3=$nsright->Entry (-background => '#00ff00', -foreground => 'black', -width=>12, -borderwidth=>2, -relief => 's +unken')->pack(); $nsbut2=$thistab->Button(-text => 'Cancel', -background => 'red', -foreground => 'black', -command => sub { $tabsinside->delete($mytab); })->pack( -side => 'right', -pady =>2, -anchor => 'w'); $nsbut1=$thistab->Button(-text => 'Start', -background => '#00FF00 +', -foreground => 'black', -command => sub { &nmap_scan() } )->pack( -side => 'right', -pady => 2, -anchor => 'w'); }
In reply to Dynamic tab creation/destuction with Tk::Notebook by thefinn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |