Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Problem with menu 'seperator'
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

Report this thread to moderator Post Follow-up to this message
Old Post
Dan Peterson
05-04-05 01:57 AM


Re: Problem with menu 'seperator'
"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 s
eem to separate and push the menu off to the right anymore. menu "Help" disp
lays 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

Report this thread to moderator Post Follow-up to this message
Old Post
Dan Peterson
05-04-05 08:57 AM


Re: Problem with menu 'seperator'
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

Report this thread to moderator Post Follow-up to this message
Old Post
Ala Qumsieh
05-04-05 08:57 PM


Re: Problem with menu 'seperator'
"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



Report this thread to moderator Post Follow-up to this message
Old Post
Dan Peterson
05-04-05 08:57 PM


Re: Problem with menu 'seperator'
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... 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Dan Peterson
05-05-05 01:58 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PerlTk archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:47 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.