"<table></table>" and "<frameset><frame></frame></frameset>" in perl/tk
Dear my friends... Anybody would be so kind telling me what is similar in perl/tk to arrange the location of a form written in perl/tk? I want a nice look for my perl/tk application. Somewhat like this below: 1. Name : <place to type-in> 2. Address : <place to type-in> 3. Telephone : <place to type-in> I have made the main menu of my application with "Menubutton". And I want if the user click on the menu that what the user see is only the aimed application displayed on the determined area (under the main menu) but the menu has no change in position and form. Somewhat like on HTML: === <frameset><frame name=mainmenu src=mainmenu.html></frame><frame name=display></frame></frameset> === <!--mainmenu.html :--> <table> <ol> <tr><td colspan=2>Main menu :</td></tr> <tr><td>1.</td><td><a href="biodata.html" target="display">biodata</a></td></tr> </table> === So the mainmenu will not have any change only the content of the display frame will have change as the user work with this application main menu. Thank you very much in advance. === #my current perl/tk code: #!/usr/bin/perl -w use Tk; my $mw = MainWindow->new; $mw->title("i\@m NA - Linux Server Administrating Tool"); $frmm = $mw -> Frame(-borderwidth => 2, -relief => 'ridge')->pack(-side => 'top', -anchor => 'n', -expand => 1, -fill => 'x'); $mobject = $frmm -> Menubutton(-text => "Administrated Object", -menuitems => [['command' => "Samba", -command => \&menusamba], ['command' => "Squid", -command => \&menusquid]])->pack(-side => 'left', -anchor => 'nw', -expand =>0); $msetting = $frmm -> Menubutton(-text => "Setting")->pack(-side => 'left', -anchor => 'nw', -expand => 0, -after => $mobject); $mfile = $frmm -> Menubutton(-text => "File", -tearoff => 0, -menuitems => [["command" => "New Document", -command => \&new_document], "-" ])->pack(-side => 'left', -anchor => 'nw', -expand => 0, -after => $msetting); $doc_num = 1; $doc_list_limit = 9; $mw -> Button(-text => "New Document", -command => \&new_document)->pack(-side => 'bottom', -anchor => 'e'); $entry = $mw->Entry(-width => 80)->pack(-expand => 1, -fill => 'both'); $mexit = $frmm -> Button(-text => "Exit", -command => \&keluar, -borderwidth => 0)->pack(-side => 'left', -anchor => 'nw', -expand => 0, -after => $mfile); $mhelp = $frmm -> Menubutton(-text => "Help")->pack(-side => 'right', -anchor => 'ne', -expand => 0); $judul = $mw->Label(-text => "Network Administrator Main Menu", -anchor => 'center')->place(-y => 30, -x => 0); MainLoop; sub keluar{ exit(); } sub menusamba{ $judul = $mw->Label(-text => ""); } sub new_document{ my $name = "Document $doc_num"; $doc_num++; push (@current,$name); $filem->command(-label => "$name", -command => [ \&select_document, $name ]); &select_document($name); if ($#current > $doc_list_limit){ $filem->menu->delete(2); shift(@current); } } sub select_document { my ($selected) = @_; $entry->delete(0,'end'); $entry->insert('end',"SELECTED DOCUMENT: $selected"); } __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/
participants (1)
-
Prabu Subroto