Tcl-pTk

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


 * Add internal variable $Tcl::pTk::_Tile_ge_0840 to indicate whether Tile/Ttk
   version is 0.8.4.0 or later, which is needed by certain features.
   Use this variable to address new test failures in tileTree.t on CentOS 6.
 * Make Time::HiRes dependency explicit: it is a core module, but is not
   installed by default on some distributions, e.g. CentOS 6.

1.08  2020-07-17

 * Improved support for ttk::treeview `item`, `selection`, and `tag` commands
   as ttkTreeview methods: these now return Perl lists rather than string
   representations of Tcl lists. See https://git.io/JJZ7C
 * Emulate timeofday() with Time::HiRes::time()
   instead of Tcl 8.5+ [clock microseconds]

1.07  2020-03-13

 * Allow '.' in Cascade labels (RT #125058)

1.06_01  2020-03-12

lib/Tcl/pTk/Tile.pm  view on Meta::CPAN

			my $methodName = $pfn . "\u$submethod";
			#print "Creating method $methodName for call ".join(" ", @$mappedcommandBase, $submethod)."\n";
			*{ $methodName } = sub {
				my $self = shift;
				$self->call( @$mappedcommandBase, $submethod, @_ );
			};
		}
	}
}

###### Special cases to get ttkTreeview methods to work ###

# Avoid using Tcl::pTk::Widget::children
sub Tcl::pTk::ttkTreeview::children {
    my $self = shift;
    $self->call($self->path, 'children', @_);
}

# Ensure Perl list (not Tcl list) is returned
# https://github.com/chrstphrchvz/perl-tcl-ptk/issues/7
sub Tcl::pTk::ttkTreeview::selection {
    my $self = shift;
    $self->call($self->path, 'selection', @_);
}
sub Tcl::pTk::ttkTreeview::item {
    my $self = shift;
    $self->call($self->path, 'item', @_);
}
sub Tcl::pTk::ttkTreeview::tag {
    my $self = shift;
    $self->call($self->path, 'tag', @_);
}
sub Tcl::pTk::ttkTreeview::cellselection {
    my $self = shift;
    $self->call($self->path, 'cellselection', @_);
}

1;

lib/Tcl/pTk/demos/widget_lib/mclist.pl  view on Meta::CPAN

        );

        my $msg = $TOP->ttkLabel( -text => 
                "Ttk is the new Tk themed widget set. One of the widgets it includes is a tree widget, which can be configured to display multiple columns of informational data without displaying the tree itself. This is a simple way to build a listb...
                qw/ -wraplength 4i -justify left/)->pack(-side => 'top', -fill => 'x');
         
                
        # Make the button frame
        my $bigFrame = $TOP->ttkFrame()->pack(-expand => 'y', -fill => 'both');
        
        my $tree = $bigFrame->Scrolled('ttkTreeview',-columns => [qw/ country capital currency/], -show => 'headings',       -scrollbars => 'se' )->pack(-fill => 'both', -expand => 1);
        #my $tree = $bigFrame->ttkTreeview(-columns => [qw/ country capital currency/], -show => 'headings')->pack(-fill => 'both', -expand => 1);
        
        my @data = (        
            'Argentina',	'Buenos Aires',		'ARS',
            'Australia',	'Canberra',		'AUD',
            'Brazil',		'Brazilia',		'BRL',
            'Canada',		'Ottawa',		'CAD',
            'China',		'Beijing',		'CNY',
            'France',		'Paris',		'EUR',
            'Germany',		'Berlin',		'EUR',
            'India',		'New Delhi',		'INR',

t/tileTree.t  view on Meta::CPAN

plan tests => 8;

my $msg = $TOP->ttkLabel( -text => 
        "Ttk is the new Tk themed widget set. One of the widgets it includes is a tree widget, which can be configured to display multiple columns of informational data without displaying the tree itself. This is a simple way to build a listbox that ...
        qw/ -wraplength 4i -justify left/)->pack(-side => 'top', -fill => 'x');
 
        
# Make the button frame
my $bigFrame = $TOP->ttkFrame()->pack(-expand => 'y', -fill => 'both');

my $tree = $bigFrame->Scrolled('ttkTreeview',-columns => [qw/ country capital currency/], -show => 'headings',       -scrollbars => 'se' )->pack(-fill => 'both', -expand => 1);
#my $tree = $bigFrame->ttkTreeview(-columns => [qw/ country capital currency/], -show => 'headings')->pack(-fill => 'both', -expand => 1);

my @data = (        
    'Argentina',	'Buenos Aires',		'ARS',
    'Australia',	'Canberra',		'AUD',
    'Brazil',		'Brazilia',		'BRL',
    'Canada',		'Ottawa',		'CAD',
    'China',		'Beijing',		'CNY',
    'France',		'Paris',		'EUR',
    'Germany',		'Berlin',		'EUR',
    'India',		'New Delhi',		'INR',



( run in 0.772 second using v1.01-cache-2.11-cpan-49f99fa48dc )