Delete the first line of the Menu 
Author Message
 Delete the first line of the Menu

Hello,

I create a simple Menu-Widget like the following Script.
The Problem is, whenever I create a Menu, I get first a simple
Line in the Menu. Is there a Way to disable it (I have Windows)?

                 thanks very much
                         Gilbert

use strict;
use Tk;

my $mainwindow = MainWindow->new;
my $menubar = $mainwindow->Frame()->pack(-side => 'top', -fill => 'x');
my $filemenu = $menubar->Menubutton(-text => 'File')->pack();
$filemenu->command( -label  => 'Open Config');

MainLoop;



Mon, 21 Mar 2005 16:31:50 GMT  
 Delete the first line of the Menu
use strict;
use Tk;

my $mainwindow = MainWindow->new;
my $menubar = $mainwindow->Frame()->pack(-side => 'top', -fill => 'x');
my $filemenu = $menubar->Menubutton(-text => 'File', -tearoff=>0)->pack();
$filemenu->command( -label => 'Open Config');

MainLoop;

Maybe you also want to make your Menubar a true menubar instead of a
Frame...

use strict;
use Tk;
use Tk::Menubar;

my $mainwindow = MainWindow->new;
my $menubar = $mainwindow->Menubar;
$filemenu = $menubar->Menubutton(-text=>"File", -tearoff=>0);
$filemenu->command( -label => 'Open Config');

MainLoop;

Joeri


Quote:
> Hello,

> I create a simple Menu-Widget like the following Script.
> The Problem is, whenever I create a Menu, I get first a simple
> Line in the Menu. Is there a Way to disable it (I have Windows)?

>                  thanks very much
>                          Gilbert

> use strict;
> use Tk;

> my $mainwindow = MainWindow->new;
> my $menubar = $mainwindow->Frame()->pack(-side => 'top', -fill => 'x');
> my $filemenu = $menubar->Menubutton(-text => 'File')->pack();
> $filemenu->command( -label  => 'Open Config');

> MainLoop;



Mon, 21 Mar 2005 21:11:44 GMT  
 Delete the first line of the Menu
Oh yes, that was it!
Thanks
Quote:

> use strict;
> use Tk;

> my $mainwindow = MainWindow->new;
> my $menubar = $mainwindow->Frame()->pack(-side => 'top', -fill => 'x');
> my $filemenu = $menubar->Menubutton(-text => 'File', -tearoff=>0)->pack();
> $filemenu->command( -label => 'Open Config');

> MainLoop;

> Maybe you also want to make your Menubar a true menubar instead of a
> Frame...

> use strict;
> use Tk;
> use Tk::Menubar;

> my $mainwindow = MainWindow->new;
> my $menubar = $mainwindow->Menubar;
> $filemenu = $menubar->Menubutton(-text=>"File", -tearoff=>0);
> $filemenu->command( -label => 'Open Config');

> MainLoop;

> Joeri



>>Hello,

>>I create a simple Menu-Widget like the following Script.
>>The Problem is, whenever I create a Menu, I get first a simple
>>Line in the Menu. Is there a Way to disable it (I have Windows)?

>>                 thanks very much
>>                         Gilbert

>>use strict;
>>use Tk;

>>my $mainwindow = MainWindow->new;
>>my $menubar = $mainwindow->Frame()->pack(-side => 'top', -fill => 'x');
>>my $filemenu = $menubar->Menubutton(-text => 'File')->pack();
>>$filemenu->command( -label  => 'Open Config');

>>MainLoop;



Mon, 21 Mar 2005 21:39:21 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Deleting (Only) First Blank Line in File

2. Deleting first line

3. deleting first two lines of text file???

4. read in a file and delete first 8 lines

5. Tk:Menu->delete(...) bug

6. deleting a menu entry in a Text widget

7. Please Help: deleting menu items

8. Deleting Menu Items?

9. Deleting Menu items...

10. Quickest way to delete first n characters?

11. Win32 Look and Feel - Line under Menu Bar

12. newbie: script only displays first line of text to the browser

 

 
Powered by phpBB® Forum Software