Last change
on this file since 11852 was 11852, checked in by mdewsnip, 18 years ago |
Initial revision
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1023 bytes
|
Line | |
---|
1 | # NOTE: Derived from ..\blib\lib\Tk\Listbox.pm.
|
---|
2 | # Changes made here will be lost when autosplit is run again.
|
---|
3 | # See AutoSplit.pm.
|
---|
4 | package Tk::Listbox;
|
---|
5 |
|
---|
6 | #line 673 "..\blib\lib\Tk\Listbox.pm (autosplit into ..\blib\lib\auto\Tk\Listbox\UpDown.al)"
|
---|
7 | # UpDown --
|
---|
8 | #
|
---|
9 | # Moves the location cursor (active element) up or down by one element,
|
---|
10 | # and changes the selection if we're in browse or extended selection
|
---|
11 | # mode.
|
---|
12 | #
|
---|
13 | # Arguments:
|
---|
14 | # w - The listbox widget.
|
---|
15 | # amount - +1 to move down one item, -1 to move back one item.
|
---|
16 | sub UpDown
|
---|
17 | {
|
---|
18 | my $w = shift;
|
---|
19 | my $amount = shift;
|
---|
20 | $w->activate($w->index('active')+$amount);
|
---|
21 | $w->see('active');
|
---|
22 | $LNet__0 = $w->cget('-selectmode');
|
---|
23 | if ($LNet__0 eq 'browse')
|
---|
24 | {
|
---|
25 | $w->selectionClear(0,'end');
|
---|
26 | $w->selectionSet('active')
|
---|
27 | }
|
---|
28 | elsif ($LNet__0 eq 'extended')
|
---|
29 | {
|
---|
30 | $w->selectionClear(0,'end');
|
---|
31 | $w->selectionSet('active');
|
---|
32 | $w->selectionAnchor('active');
|
---|
33 | $Prev = $w->index('active');
|
---|
34 | @Selection = ();
|
---|
35 | }
|
---|
36 | }
|
---|
37 |
|
---|
38 | # end of Tk::Listbox::UpDown
|
---|
39 | 1;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.