Tcl-pTk

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
 * 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

175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
                        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
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

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
);
 
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

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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.590 second using v1.01-cache-2.11-cpan-87723dcf8b7 )