in reply to MainWindow geometry problem (update?)
#!/usr/bin/perl use strict; use warnings; use Tk; use Tk::Entry; my $mw = MainWindow->new; $mw->geometry("150x75+250+250"); $mw->title("Entry"); my $entry = $mw->Entry( -text => "Entry: ", -background => "black", -foreground => "green", -font => "courierfont 10 bold", -relief => "groove", -width => 30, -selectborderwidth => 5 )->pack( -expand => 1, -fill => "x", -ipadx => 10, -ipady => 10 ); $mw->Button( -text => "Quit", -command => ["destroy", $mw] )->pack(-side => "bottom"); $entry->bind("<Key-Return>", "\033"); $mw->update; MainLoop;
|
|---|