Hello HDB, $opsm is defined in the code below however the Add Manifest menu does not return to the Ops menu it needs to return to the Manifest Menu:

sub opsmgt { if ( !Exists( $opsm ) ) { $opsm = $mw->Toplevel(); $opsm->resizable(0,0); my $opsmframe2 = $opsm->Frame()->pack( -side => 'right', -fill => 'bo +th', -anchor, 'e'); my $opsmframe = $opsm->Frame()->pack( -side => 'left', -fill => 'bo +th', -anchor, 'w'); $opsm->geometry('400x125+0+0'); $opsm->title( "Operations Management Menu" ); my $opsmbtn1 = $opsmframe->Button( -text, 'List Creator', -command = +> sub { &listcreator; $opsm->iconify;})->grid( -row, 0, -column, +0, -sticky => 'nsew'); $balloon->attach($opsmbtn1, -balloonmsg => "List Creator"); my $opsmbtn2 = $opsmframe->Button( -text, 'Waybill Generator', -comm +and => sub { &waybillgenerator; $opsm->iconify;})->grid( -row, 1, +-column, 0, -sticky => 'nsew'); $balloon->attach($opsmbtn2, -balloonmsg => "Waybill Generator"); my $opsmbtn3 = $opsmframe->Button( -text, 'Material Order Creator', +-command => sub { &materialordercreator; $opsm->iconify;})->grid( -r +ow, 2, -column, 0, -sticky => 'nsew'); $balloon->attach($opsmbtn3, -balloonmsg => "Material Order Creator"); my $opsmbtn4 = $opsmframe->Button( -text, 'Truck Scheduler', -comman +d => sub { &truckscheduler; $opsm->iconify;})->grid( -row, 3, -column +, 0, -sticky => 'nsew'); $balloon->attach($opsmbtn4, -balloonmsg => "Truck Scheduler"); my $opsmbtn5 = $opsmframe2->Button( -text, 'Trailer Manifest', -comm +and => sub { &manifest; $opsm->iconify;})->grid( -row, 0, -column, 3, + -sticky => 'nsew'); $balloon->attach($opsmbtn5, -balloonmsg => "Trailer Manifest"); my $opsmbtn6 = $opsmframe2->Button( -text, 'Routes', -command => sub +{ &routes; $opsm->iconify;})->grid( -row, 1, -column, 3, -sticky => ' +nsew'); $balloon->attach($opsmbtn6, -balloonmsg => "Routes"); my $opsmbtn7 = $opsmframe2->Button( -text, 'Truck Hostler')->grid( -r +ow, 2, -column, 3, -sticky => 'nsew'); $balloon->attach($opsmbtn7, -balloonmsg => "Truck Hostler"); my $opsmbtn8 = $opsmframe2->Button( -text, 'Return To Main Menu', -co +mmand => sub { $opsm->withdraw; $mw->deiconify; $btn7->configure(-state=>'normal'), $btn10->configure(-state=>'normal' +) ;})->grid( -row, 3, -column, 3, -sticky => 'nsew'); $balloon->attach($opsmbtn8, -balloonmsg => "Return To Main Menu"); } else { $opsm->deiconify(); $opsm->raise(); } } # END OPERATIONS

In reply to Re^4: TK Submenus by PilotinControl
in thread TK Submenus by PilotinControl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.