use strict; use warnings; use Tk; use Tk::MDI; my $mw = tkinit; my $mdi = $mw->MDI( -style=>'win32', -background=>'gray'); my $child1 = $mdi->add; my $text = $child1->Text->pack; $text->insert('end',"A text widget"); my $child2 = $mdi->add(-titletext=>'Listbox Title'); my $mbar = $child2 -> Menu(); $child2 -> configure(-menu => $mbar); my $submenu = $mbar -> cascade(-label=>"OPTIONS", -underline=>0, -tearoff =>0); $submenu -> command(-label => "FILE", -underline=>0); $submenu -> command(-label => "EDIT", -underline=>0); my $lb = $child2->Listbox->pack; $lb->insert(0,"A Listbox"); MainLoop;