Dear Monks,
I am trying to justify cascade entries within a menubar but every option I try does not seem to work and its driving me nuts.
I've tried packing each cascade and although this is accepted it has no effect. All the cascades are justified to the left regardless. I have previously used menubuttons directly on a normal frame and this allows justification of the buttons on the frame but I lose the automatic navigation (Alt+F etc) managed when using cascades.
Am I just being greedy and in fact I need to settle on one or the other?
Any help would be greatly appreciated.
Here is the code snippet procedure sub that defines the menu and cascades...
#---------------------------------------------------------------------
+--------------
#-- Define menubar
sub Define_Menu {
$Menu_Frame = $TopWindow->Frame(-relief => 'raised', -borderwidth =
+> 2)->form(-top=>'%0',-left=>'%0',-right=>'%100');
$Menu_Toplevel = $Menu_Frame->toplevel ;
$Menu_Bar = $Menu_Toplevel->Menu(-type => 'menubar') ;
$Menu_Toplevel->configure(-menu => $Menu_Bar) ;
$Menu_File = $Menu_Bar->cascade(-label=> '~File', -tearoff => 0);
$Menu_File_Select = $Menu_File->command (-label => 'Select ~M
+ySQL Dump File...',
-command => \&Select_C
+onfig_Root,
-accelerator => 'Control+c
+') ;
$Menu_File->separator ;
$Menu_File_Exit = $Menu_File->command (-label => '~Exit',
-command => \&Abandon,
-accelerator => 'Control+x')
+ ;
$Menu_File->pack(-side=>'left',-anchor=>'nw') ;
$Menu_Run = $Menu_Bar->cascade(-label=> '~Run', -tearoff => 0 );
$Menu_Run_Split = $Menu_Run->command (-label => '~Split',
-command => \&Split ,
-accelerator => 'Control+q');
$Menu_Help = $Menu_Bar->cascade(-label=> '~Help', -tearoff => 0 ) ;
$Menu_Help_Help = $Menu_Help->command (-label => '~Help',
-command => [\&ShowHelpMess
+age],
-accelerator => 'Control+h')
+ ;
$Menu_Help_About = $Menu_Help->command (-label => '~About',
-command => [\&ShowAboutMe
+ssage,$ver],
-accelerator => 'Control+a'
+) ;
$Menu_Help->pack(-side=>'right',-anchor=>'ne') ; ;
$Menu_Run_Split->configure(-state => 'disabled');
}
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.