in reply to Tkx: Tkx editor doesn't display menus on OS X
The scratchpad is volatile. Someone coming in later having a similar problem won't be able to benefit from the answers given here if you decided to remove the code from your scratchpad. For posterity, here's the code in question:
use warnings; use strict; use Tkx; $Tkx::TRACE = 1; our $VERSION = "1.0.0"; my ($mw, $tw); $mw = Tkx::widget->new("."); $mw->configure(-menu => mk_menu($mw)); Tkx::wm_title($mw, "GutThing-$VERSION"); my ($height, $width, $wrap) = (20, 80, "none"); $tw = $mw->new_text( -height => $height, -width => $width, -wrap => $wrap, ); $tw->g_pack( -anchor => "center", -expand => 1, -fill => "both", ); $tw->g_focus; $tw->insert("end", "If you can read this it worked"); $tw->insert("end", " but I don't do much at the moment."); $tw->insert("end", " This is a long line that doesn't wrap."); $tw->insert("end", " We don't wrap our lines in this editor for PPing. +\n"); $tw->insert("end", "If you type here the line should scroll if you go +longer than window width.\n"); Tkx::MainLoop(); exit; sub mk_menu { my $mw = shift; my $menu = $mw->new_menu; my $file = $menu->new_menu( -tearoff => 0, ); $menu->add_cascade( -label => "File", -underline => 0, -menu => $file, ); return $menu; }
Sorry that I can't help you, though.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Tkx: Tkx editor doesn't display menus on OS X
by vlsimpson (Beadle) on Nov 25, 2008 at 03:34 UTC |