package myApp::MyWidget; use strict; use warnings; use base qw/Tk::Frame/; our $VERSION = 0.1; Construct Tk::Widget 'MyWidget'; =pod =head1 NAME myApp::MyWidget - Widget for use in myApp =head1 SYNOPSIS use strict; use Tk; use myApp::MyWidgeet; my $mw = new MainWindow; my $widget = $mw->MyWidget( %options ); $widget->pack; =cut sub Populate { my($self, $args) = @_; $self->SUPER::Populate($args); my $top = $self->Frame()->pack( -fill => 'both', -expand => 'x', -ipadx => 5, -ipady => 5, ); # ... Other stuff ... # $self->ConfigSpecs( # ... # ); # $self->Delegates('DEFAULT' => $scale); } 1;