Tk-HMListbox

 view release on metacpan or  search on metacpan

lib/Tk/HMListbox.pm  view on Meta::CPAN

##
##############################################################################
## HMCListbox 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::HMListbox::HMCListbox;
	use base qw(Tk::Derived Tk::HListbox);

	Tk::Widget->Construct('HMCListbox');

	sub Populate {
		my ($w, $args) = @_;
		$w->SUPER::Populate($args);
		$w->ConfigSpecs(
				-updatecommand => ['CALLBACK'],
				-xscancommand  => ['CALLBACK'],
		);

lib/Tk/HMListbox.pm  view on Meta::CPAN

		$w->Callback(-updatecommand=>$w->can('Tk::HListbox::CtrlPriorNext'),@_);
	}
}

##############################################################################
## HMButton is like an ordinary Button, but with an addition option:
## -pixelwidth
## The new configure method makes sure the pixelwidth is always retained.
{
	package Tk::HMListbox::HMButton;
	use base qw(Tk::Derived Tk::Button);   
	Tk::Widget->Construct('HMButton');

	sub Populate {
		my ($w, $args) = @_;
		$w->SUPER::Populate($args);
		$w->ConfigSpecs(
				-pixelwidth => ['PASSIVE'],
				-bitmap => [qw/SELF bitmap bitmap/, 'noarrow'],
				-compound => [qw/SELF compound compound/, 'right'],
				-background    => [qw/SELF background Background/, undef],



( run in 1.375 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )