Tk-MListbox
view release on metacpan or search on metacpan
MListbox.pm view on Meta::CPAN
## components of MListbox
##
##############################################################################
## CListbox is similar to an ordinary listbox, but with the following
## differences:
## - Calls an -updatecommand whenever something happens to it.
## - Horizontal scanning is disabled, calls -xscancommand to let parent widget
## handle this.
{
package Tk::CListbox;
use base qw(Tk::Derived Tk::Listbox);
Tk::Widget->Construct('CListbox');
sub Populate {
my ($w, $args) = @_;
$w->SUPER::Populate($args);
$w->ConfigSpecs(
-background => [qw/SELF background Background/, $Tk::NORMAL_BG],
-foreground => [qw/SELF foreground Foreground/, $Tk::NORMAL_FG],
-updatecommand => ['CALLBACK'],
MListbox.pm view on Meta::CPAN
$w->Callback(-xscancommand=>$type,$x);
}
}
##############################################################################
## HButton is like an ordinary Button, but with an addition option:
## -pixelwidth
## The new configure method makes sure the pixelwidth is always retained.
{
package Tk::HButton;
use base qw(Tk::Derived Tk::Button);
Tk::Widget->Construct('HButton');
sub Populate {
my ($w, $args) = @_;
$w->SUPER::Populate($args);
$w->ConfigSpecs(
-pixelwidth => ['PASSIVE'],
-background => [qw/SELF background Background/, $Tk::NORMAL_BG],
-foreground => [qw/SELF foreground Foreground/, $Tk::NORMAL_FG]
);
( run in 1.967 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )