For Programmers: Free Programming Magazines  


Home > Archive > PerlTk > May 2005 > Problem with menu 'seperator'









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Problem with menu 'seperator'
Dan Peterson

2005-05-03, 8:57 pm

I have active state Perl.
I was running 5.8.3 <unsure of build> I built a little applet that used:

#Open Window
my $main = MainWindow->new(-title => 'app title'); # Open the main window
$main->geometry('+450+300'); # Possision the window

#Build the menu
my $menu = $main->Menu(-type=>'menubar');

$main->configure (-menu => $menu);
$menu->add('separator' );
my $menuHelp = $menu->cascade(-label => '~Help');
$menuHelp->command(-label => '~How to...', -command => sub{Help()} );
$menuHelp->command(-label => '~About...', -command => sub{About()} );

The separator would push the cascaded menu item to the right. Worked great, no problems.

I updated to Active Build 5.8.6 build 811
And not the separator does not seem to be separating and more.

Can anybody enlighten me on what I am doing wrong?

Another menu problem is I cant seem to NOT have a tearoff menu, how does one tell Tk not to tearoff the menu?


--
Dan
Dan Peterson

2005-05-04, 3:57 am

"And not the separator does not seem to be separating and more."

Okay that make little sense, What I meant to say is the separator does not seem to separate and push the menu off to the right anymore. menu "Help" displays on the left.

Thanks in advance


--
Dan Peterson
"Dan Peterson" <drpeterson@es.net> wrote in message news:4277db83$1@news3.es.net...
I have active state Perl.
I was running 5.8.3 <unsure of build> I built a little applet that used:

#Open Window
my $main = MainWindow->new(-title => 'app title'); # Open the main window
$main->geometry('+450+300'); # Possision the window

#Build the menu
my $menu = $main->Menu(-type=>'menubar');

$main->configure (-menu => $menu);
$menu->add('separator' );
my $menuHelp = $menu->cascade(-label => '~Help');
$menuHelp->command(-label => '~How to...', -command => sub{Help()} );
$menuHelp->command(-label => '~About...', -command => sub{About()} );

The separator would push the cascaded menu item to the right. Worked great, no problems.

I updated to Active Build 5.8.6 build 811
And not the separator does not seem to be separating and more.

Can anybody enlighten me on what I am doing wrong?

Another menu problem is I cant seem to NOT have a tearoff menu, how does one tell Tk not to tearoff the menu?


--
Dan
Ala Qumsieh

2005-05-04, 3:57 pm

Dan Peterson wrote:

> I updated to Active Build 5.8.6 build 811
> And not the separator does not seem to be separating and more.
>
> Can anybody enlighten me on what I am doing wrong?


Not sure since I can't reproduce your problem.

> Another menu problem is I cant seem to NOT have a tearoff menu, how does
> one tell Tk not to tearoff the menu?


my $menu = $main->Menu(-type=>'menubar', -tearoff => 0);

--Ala
Dan Peterson

2005-05-04, 3:57 pm

"my $menu = $main->Menu(-type=>'menubar', -tearoff => 0);"

It stills tears off. I think that maybe I have something wrong with the
install????


--
DANIEL PETERSON
"Ala Qumsieh" <notvalid@email.com> wrote in message
news:T96ee.2135$5o2.197@newssvr13.news.prodigy.com...
> Dan Peterson wrote:
>
>
> Not sure since I can't reproduce your problem.
>
>
> my $menu = $main->Menu(-type=>'menubar', -tearoff => 0);
>
> --Ala



Dan Peterson

2005-05-04, 8:58 pm

I figured out the tearoff, with the help of this page:
http://www.geocities.com/binnyva/co...rl_tk_tutorial/

by adding -tearoff=>0 to the cascade line.

my $menuHelp = $menu->cascade(-label => '~Help', -tearoff=>0);



The seperator still does not act as expected;

--
DANIEL PETERSON
"Dan Peterson" <drpeterson@es.net> wrote in message
news:42790209$1@news3.es.net...
> "my $menu = $main->Menu(-type=>'menubar', -tearoff => 0);"
>
> It stills tears off. I think that maybe I have something wrong with the
> install????
>
>
> --
> DANIEL PETERSON
> "Ala Qumsieh" <notvalid@email.com> wrote in message
> news:T96ee.2135$5o2.197@newssvr13.news.prodigy.com...
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com