Tk Library Source Code

Check-in [78eab8aede]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Tablelist: Reworked the bindings that invoke "expand|collapse ... -fully" on the Mac.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 78eab8aede44d6b723c67f2b892e9f32057935b19ca1759be88cb4e6dcc91ce1
User & Date: csaba 2025-08-07 16:53:33.887
Context
2025-08-09
16:52
Tablelist: Minor improvement related to the binding tags. check-in: b81cb3d074 user: csaba tags: trunk
2025-08-07
16:53
Tablelist: Reworked the bindings that invoke "expand|collapse ... -fully" on the Mac. check-in: 78eab8aede user: csaba tags: trunk
2025-08-02
11:52
Tooltip: Fix for ticket [9924aee881]. Thanks to Ralf Fassel for his patch. check-in: ced0a69b39 user: csaba tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to modules/tablelist/CHANGES.txt.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
What is new in Tablelist 7.7?
-----------------------------

1. Added bindings that invoke "expand|collapse ... -fully" for the
   events <Control-Button-1> (over an expand/collapse control),
   <Control-Right|plus|KP_Add>, and <Control-Left|minus|KP_Subtract>
   (thanks to Torsten Berg for his proposal).

2. Added explicit support for the "droid" theme, which is the default in
   AndroWish.

3. Improvements related to the themes provided by the awthemes package
   and the ones that are not explicitly supported by Tablelist.




|
|
|
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
What is new in Tablelist 7.7?
-----------------------------

1. Added mouse and keyboard event bindings that invoke the "expand" and
   "collapse" subcommands with the "-fully" option.  See the updated
   subsection "TREE WIDGET BINDINGS:" in the reference manual for
   details (thanks to Torsten Berg for his proposal and testing).

2. Added explicit support for the "droid" theme, which is the default in
   AndroWish.

3. Improvements related to the themes provided by the awthemes package
   and the ones that are not explicitly supported by Tablelist.

Changes to modules/tablelist/doc/tablelistWidget.html.
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
          <td>Generated whenever the horizontal view in the tablelist widget's
          window changes (and the horizontal scrollbar, if any, is
          updated).</td>
          <td>A list consisting of the numerical indices of the leftmost and
          rightmost columns visible in the tablelist window, i.e., of the
          numerical equivalents of the <a href="#col_indices">column
          indices</a> <code><b>left</b></code> and
	  <code><b>right</b></code>.</td>
        </tr>

        <tr valign="top">
          <td><code><b>&lt;&lt;TablelistYViewChanged&gt;&gt;</b></code></td>
          <td>Generated whenever the vertical view in the tablelist widget's
          window changes (and the vertical scrollbar, if any, is updated).</td>
          <td>A list consisting of the numerical indices of the topmost and
          bottommost body items visible in the tablelist window, i.e., of
          the numerical equivalents of the <a href="#row_indices">row
          indices</a> <code><b>top</b></code> and
	  <code><b>bottom</b></code>.</td>
        </tr>
      </table>
    </dd>

    <dd class="tm">In addition, Tablelist_tile defines the virtual event
    <code><b>&lt;&lt;TablelistThemeDefaultsChanged&gt;&gt;</b></code> and sends
    it (without any user data) <i>to the main window</i> (!) after invoking the







|










|







8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
          <td>Generated whenever the horizontal view in the tablelist widget's
          window changes (and the horizontal scrollbar, if any, is
          updated).</td>
          <td>A list consisting of the numerical indices of the leftmost and
          rightmost columns visible in the tablelist window, i.e., of the
          numerical equivalents of the <a href="#col_indices">column
          indices</a> <code><b>left</b></code> and
          <code><b>right</b></code>.</td>
        </tr>

        <tr valign="top">
          <td><code><b>&lt;&lt;TablelistYViewChanged&gt;&gt;</b></code></td>
          <td>Generated whenever the vertical view in the tablelist widget's
          window changes (and the vertical scrollbar, if any, is updated).</td>
          <td>A list consisting of the numerical indices of the topmost and
          bottommost body items visible in the tablelist window, i.e., of
          the numerical equivalents of the <a href="#row_indices">row
          indices</a> <code><b>top</b></code> and
          <code><b>bottom</b></code>.</td>
        </tr>
      </table>
    </dd>

    <dd class="tm">In addition, Tablelist_tile defines the virtual event
    <code><b>&lt;&lt;TablelistThemeDefaultsChanged&gt;&gt;</b></code> and sends
    it (without any user data) <i>to the main window</i> (!) after invoking the
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626

12627
12628
12629
12630
12631
12632

12633
12634
12635
12636
12637
12638
12639
12640
12641

12642
12643
12644

12645
12646
12647
12648
12649
12650
12651
      <ol>
        <li class="tm">Pressing mouse button 1 over an expand/collapse control
        toggles the expanded/collapsed state of the corresponding row by
        invoking the non-recursive version of the <code><b><a href=
        "#expand">expand</a></b></code> or <code><b><a href=
        "#collapse">collapse</a></b></code> subcommand (the one with the
        <code><b>-partly</b></code> argument).&nbsp; Pressing mouse button 1
        over an expand/collapse control with the <code>Control</code> key down
        toggles the expanded/collapsed state of the corresponding row with the
        aid of the <code><b>expand</b></code> or <code><b>collapse</b></code>
        subcommand's recursive version (the one with the
        <code><b>-fully</b></code> argument).</li>


        <li class="tm">If the current active row contains an expand/collapse
        control in collapsed state then the <code>Right</code>,
        <code>plus</code>, and <code>KP_Add</code> keys expand that row by
        invoking the non-recursive version of the <code><b>expand</b></code>
        subcommand, while <code>Control-Right</code>,

        <code>Control-plus</code>, and <code>Control-KP_Add</code> expand the
        row with the aid of the <code><b>expand</b></code> subcommand's
        recursive version.</li>

        <li class="tm">If the current active row contains an expand/collapse
        control in expanded state then the <code>Left</code>,
        <code>minus</code>, and <code>KP_Subtract</code> keys collapse that row
        by invoking the non-recursive version of the
        <code><b>collapse</b></code> subcommand, while

        <code>Control-Left</code>, <code>Control-minus</code>, and
        <code>Control-KP_Subtract</code> collapse the row with the aid of the
        <code><b>collapse</b></code> subcommand's recursive version.</li>

      </ol>
    </dd>

    <dt class="tm" id="header_bindings"><b>DEFAULT AND INDIVIDUAL BINDINGS FOR
    THE HEADER ITEMS</b></dt>

    <dd>The header items are contained in a text widget whose binding tag







|



|
>





|
>
|
|
|





|
>
|
|
|
>







12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
      <ol>
        <li class="tm">Pressing mouse button 1 over an expand/collapse control
        toggles the expanded/collapsed state of the corresponding row by
        invoking the non-recursive version of the <code><b><a href=
        "#expand">expand</a></b></code> or <code><b><a href=
        "#collapse">collapse</a></b></code> subcommand (the one with the
        <code><b>-partly</b></code> argument).&nbsp; Pressing mouse button 1
        over an expand/collapse control with the <code>Alt</code> key down
        toggles the expanded/collapsed state of the corresponding row with the
        aid of the <code><b>expand</b></code> or <code><b>collapse</b></code>
        subcommand's recursive version (the one with the
        <code><b>-fully</b></code> argument).&nbsp; On Mac OS X/11+ Aqua the
        <code>Command</code> key is used instead of <code>Alt</code>.</li>

        <li class="tm">If the current active row contains an expand/collapse
        control in collapsed state then the <code>Right</code>,
        <code>plus</code>, and <code>KP_Add</code> keys expand that row by
        invoking the non-recursive version of the <code><b>expand</b></code>
        subcommand, while <code>Alt-Right</code>, <code>Alt-plus</code>, and
        <code>Alt-KP_Add</code> (<code>Command-Right</code>,
        <code>Command-plus</code>, and <code>Command-KP_Add</code> on Mac OS
        X/11+ Aqua) expand the row with the aid of the
        <code><b>expand</b></code> subcommand's recursive version.</li>

        <li class="tm">If the current active row contains an expand/collapse
        control in expanded state then the <code>Left</code>,
        <code>minus</code>, and <code>KP_Subtract</code> keys collapse that row
        by invoking the non-recursive version of the
        <code><b>collapse</b></code> subcommand, while <code>Alt-Left</code>,
        <code>Alt-minus</code>, and <code>Alt-KP_Subtract</code>
        (<code>Command-Left</code>, <code>Command-minus</code>, and
        <code>Command-KP_Subtract</code> on Mac OS X/11+ Aqua) collapse the row
        with the aid of the <code><b>collapse</b></code> subcommand's recursive
        version.</li>
      </ol>
    </dd>

    <dt class="tm" id="header_bindings"><b>DEFAULT AND INDIVIDUAL BINDINGS FOR
    THE HEADER ITEMS</b></dt>

    <dd>The header items are contained in a text widget whose binding tag
Changes to modules/tablelist/scripts/tablelistBind.tcl.
895
896
897
898
899
900
901

902
903
904
905
906
907
908

#------------------------------------------------------------------------------
# tablelist::defineTablelistBody
#
# Defines the bindings for the binding tag TablelistBody.
#------------------------------------------------------------------------------
proc tablelist::defineTablelistBody {} {

    variable priv
    array set priv {
	x			""
	y			""
	afterId			""
	prevRow			""
	prevCol			""







>







895
896
897
898
899
900
901
902
903
904
905
906
907
908
909

#------------------------------------------------------------------------------
# tablelist::defineTablelistBody
#
# Defines the bindings for the binding tag TablelistBody.
#------------------------------------------------------------------------------
proc tablelist::defineTablelistBody {} {
    variable winSys
    variable priv
    array set priv {
	x			""
	y			""
	afterId			""
	prevRow			""
	prevCol			""
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058

1059






1060





1061
1062
1063
1064
1065
1066
1067
    bind TablelistBody <Control-Button-1> {
	foreach {tablelist::W tablelist::x tablelist::y} \
	    [tablelist::convEventFields %W %x %y] {}
	if {$tablelist::y < [winfo y [$tablelist::W bodypath]]} {
	    continue		;# on a vertical separator, outside the body
	}

	if {[tablelist::wasExpCollCtrlClicked %W %x %y <Control-Button-1>]} {
	    set tablelist::priv(clickedExpCollCtrl) 1
	    tablelist::condFinishEditing $tablelist::W \
		$tablelist::x $tablelist::y
	} else {
	    tablelist::beginToggle $tablelist::W \
		[$tablelist::W nearest       $tablelist::y] \
		[$tablelist::W nearestcolumn $tablelist::x]

	}






    }





    bind TablelistBody <Button-2> {
	tablelist::handleBtn2Event <Button-2> %W %x %y %X %Y
    }
    bind TablelistBody <B2-Motion> {
	tablelist::handleBtn2Event <B2-Motion> %W %x %y %X %Y
    }
    bind TablelistBody <ButtonRelease-2> {







<
<
<
<
<
|
|
|
>
|
>
>
>
>
>
>
|
>
>
>
>
>







1045
1046
1047
1048
1049
1050
1051





1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
    bind TablelistBody <Control-Button-1> {
	foreach {tablelist::W tablelist::x tablelist::y} \
	    [tablelist::convEventFields %W %x %y] {}
	if {$tablelist::y < [winfo y [$tablelist::W bodypath]]} {
	    continue		;# on a vertical separator, outside the body
	}






	tablelist::beginToggle $tablelist::W \
	    [$tablelist::W nearest       $tablelist::y] \
	    [$tablelist::W nearestcolumn $tablelist::x]
	tablelist::condFinishEditing $tablelist::W $tablelist::x $tablelist::y
    }
    set modifier [expr {$winSys eq "aqua" ? "Command" : "Alt"}]
    bind TablelistBody <$modifier-Button-1> [format {
	foreach {tablelist::W tablelist::x tablelist::y} \
	    [tablelist::convEventFields %%W %%x %%y] {}
	if {$tablelist::y < [winfo y [$tablelist::W bodypath]]} {
	    continue		;# on a vertical separator, outside the body
	}

	if {[tablelist::wasExpCollCtrlClicked %%W %%x %%y <%s-Button-1>]} {
	    set tablelist::priv(clickedExpCollCtrl) 1
	}
    } $modifier]
    bind TablelistBody <Button-2> {
	tablelist::handleBtn2Event <Button-2> %W %x %y %X %Y
    }
    bind TablelistBody <B2-Motion> {
	tablelist::handleBtn2Event <B2-Motion> %W %x %y %X %Y
    }
    bind TablelistBody <ButtonRelease-2> {
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
    }
    bind TablelistBody <minus> {
	tablelist::plusMinus [tablelist::getTablelistPath %W] <minus>
    }
    bind TablelistBody <KP_Subtract> {
	tablelist::plusMinus [tablelist::getTablelistPath %W] <minus>
    }
    bind TablelistBody <Control-plus> {
	tablelist::plusMinus [tablelist::getTablelistPath %W] <Control-plus>
    }
    bind TablelistBody <Control-KP_Add> {
	tablelist::plusMinus [tablelist::getTablelistPath %W] <Control-plus>
    }
    bind TablelistBody <Control-minus> {
	tablelist::plusMinus [tablelist::getTablelistPath %W] <Control-minus>
    }
    bind TablelistBody <Control-KP_Subtract> {
	tablelist::plusMinus [tablelist::getTablelistPath %W] <Control-minus>
    }

    foreach {virtual event} {
	PrevLine <Up>		 NextLine <Down>
	PrevChar <Left>		 NextChar <Right>
	LineStart <Home>	 LineEnd <End>
	PrevWord <Control-Left>	 NextWord <Control-Right>








|
|
|
|
|
|
|
|
|
|
|
|







1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
    }
    bind TablelistBody <minus> {
	tablelist::plusMinus [tablelist::getTablelistPath %W] <minus>
    }
    bind TablelistBody <KP_Subtract> {
	tablelist::plusMinus [tablelist::getTablelistPath %W] <minus>
    }
    bind TablelistBody <$modifier-plus> [format {
	tablelist::plusMinus [tablelist::getTablelistPath %%W] <%s-plus>
    } $modifier]
    bind TablelistBody <$modifier-KP_Add> [format {
	tablelist::plusMinus [tablelist::getTablelistPath %%W] <%s-plus>
    } $modifier]
    bind TablelistBody <$modifier-minus> [format {
	tablelist::plusMinus [tablelist::getTablelistPath %%W] <%s-minus>
    } $modifier]
    bind TablelistBody <$modifier-KP_Subtract> [format {
	tablelist::plusMinus [tablelist::getTablelistPath %%W] <%s-minus>
    } $modifier]

    foreach {virtual event} {
	PrevLine <Up>		 NextLine <Down>
	PrevChar <Left>		 NextChar <Right>
	LineStart <Home>	 LineEnd <End>
	PrevWord <Control-Left>	 NextWord <Control-Right>

1132
1133
1134
1135
1136
1137
1138
1139

1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
    }
    bind TablelistBody $eventArr(PrevChar) {
	tablelist::leftRight [tablelist::getTablelistPath %W] <Left>
    }
    bind TablelistBody $eventArr(NextChar) {
	tablelist::leftRight [tablelist::getTablelistPath %W] <Right>
    }
    bind TablelistBody $eventArr(PrevWord) {

	tablelist::leftRight [tablelist::getTablelistPath %W] <Control-Left>
    }
    bind TablelistBody $eventArr(NextWord) {
	tablelist::leftRight [tablelist::getTablelistPath %W] <Control-Right>
    }
    bind TablelistBody <Prior> {
	tablelist::priorNext [tablelist::getTablelistPath %W] -1
    }
    bind TablelistBody <Next> {
	tablelist::priorNext [tablelist::getTablelistPath %W] 1
    }
    bind TablelistBody $eventArr(LineStart) {







|
>
|
|
|
|
|







1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
    }
    bind TablelistBody $eventArr(PrevChar) {
	tablelist::leftRight [tablelist::getTablelistPath %W] <Left>
    }
    bind TablelistBody $eventArr(NextChar) {
	tablelist::leftRight [tablelist::getTablelistPath %W] <Right>
    }
    set tag [expr {$winSys eq "aqua" ? "TablelistBody2" : "TablelistBody"}]
    bind $tag <$modifier-Left> [format {
	tablelist::leftRight [tablelist::getTablelistPath %%W] <%s-Left>
    } $modifier]
    bind $tag <$modifier-Right> [format {
	tablelist::leftRight [tablelist::getTablelistPath %%W] <%s-Right>
    } $modifier]
    bind TablelistBody <Prior> {
	tablelist::priorNext [tablelist::getTablelistPath %W] -1
    }
    bind TablelistBody <Next> {
	tablelist::priorNext [tablelist::getTablelistPath %W] 1
    }
    bind TablelistBody $eventArr(LineStart) {
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
		bind TablelistBody <$modifier-$pattern> [format {
		    mwutil::processTraversal %%W Tablelist <%s>
		} $pattern]
	    }
	}
    }

    variable winSys
    if {$::tk_version >= 8.7 &&
	[package vcompare $::tk_patchLevel "8.7a4"] >= 0} {
	bind TablelistBody <MouseWheel> {
	    tablelist::handleWheelEvent <MouseWheel> y %W \
		%X %Y %D -40.0
	}
	bind TablelistBody <Option-MouseWheel> {







<







1236
1237
1238
1239
1240
1241
1242

1243
1244
1245
1246
1247
1248
1249
		bind TablelistBody <$modifier-$pattern> [format {
		    mwutil::processTraversal %%W Tablelist <%s>
		} $pattern]
	    }
	}
    }


    if {$::tk_version >= 8.7 &&
	[package vcompare $::tk_patchLevel "8.7a4"] >= 0} {
	bind TablelistBody <MouseWheel> {
	    tablelist::handleWheelEvent <MouseWheel> y %W \
		%X %Y %D -40.0
	}
	bind TablelistBody <Option-MouseWheel> {
1354
1355
1356
1357
1358
1359
1360

1361




1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
		    $tablelist::W selection clear 0 end
		    tablelist::genTablelistSelectEvent $tablelist::W
		}
	    }
	}
    }


    foreach event {<Control-Prior> <Control-Next> <<Copy>>} {




	set script [string map {
	    "%W" "$tablelist::W"  "%x" "$tablelist::x"  "%y" "$tablelist::y"
	} [bind Listbox $event]]

	if {$script ne ""} {
	    ##nagelfar ignore
	    bind TablelistBody $event [format {
		if {[winfo exists %%W]} {
		    foreach {tablelist::W tablelist::x tablelist::y} \
			[tablelist::convEventFields %%W %%x %%y] {}
		    %s
		}
	    } $script]
	}
    }
}

#------------------------------------------------------------------------------
# tablelist::invokeMotionHandler
#
# Invokes the procedure handleMotionDelayed for the body of the tablelist







>
|
>
>
>
>


|

<
|
|
|
|
|
|
|
|
<







1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378

1379
1380
1381
1382
1383
1384
1385
1386

1387
1388
1389
1390
1391
1392
1393
		    $tablelist::W selection clear 0 end
		    tablelist::genTablelistSelectEvent $tablelist::W
		}
	    }
	}
    }

    foreach event {<Control-Left> <<PrevWord>> <Control-Right> <<NextWord>>
		   <Control-Prior> <Control-Next> <<Copy>>} {
	if {[set script [bind Listbox $event]] eq ""} {
	    continue
	}

	set script [string map {
	    "%W" "$tablelist::W"  "%x" "$tablelist::x"  "%y" "$tablelist::y"
	} $script]


	##nagelfar ignore
	bind TablelistBody $event [format {
	    if {[winfo exists %%W]} {
		foreach {tablelist::W tablelist::x tablelist::y} \
		    [tablelist::convEventFields %%W %%x %%y] {}
		%s
	    }
	} $script]

    }
}

#------------------------------------------------------------------------------
# tablelist::invokeMotionHandler
#
# Invokes the procedure handleMotionDelayed for the body of the tablelist
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
	}
    }

    if {$op ne ""} {
	#
	# Toggle the state of the expand/collapse control
	#
	set how [expr {[string match "<Control-*>" $event] ?
		       "-fully" : "-partly"}]
	if {[::$win cget -showbusycursor]} { ::$win setbusycursor }
	::$win $op $row $how				;# can take long
	::$win restorecursor
    }
}

#------------------------------------------------------------------------------







|
|







2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
	}
    }

    if {$op ne ""} {
	#
	# Toggle the state of the expand/collapse control
	#
	set how [expr {$event eq "<plus>" || $event eq "<minus>" ?
		       "-partly" : "-fully"}]
	if {[::$win cget -showbusycursor]} { ::$win setbusycursor }
	::$win $op $row $how				;# can take long
	::$win restorecursor
    }
}

#------------------------------------------------------------------------------
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
		set op "collapse"
	    }
	}
    }

    if {$op eq ""} {
	set amount [expr {[string match "*Right>" $event] ? 1 : -1}]

	if {[string match "<Control-*>" $event]} {
	    ::$win xview scroll $amount pages
	} else {
	    switch $data(-selecttype) {
		row {
		    ::$win xview scroll $amount units
		}

		cell {
		    if {$data(editRow) >= 0} {
			return ""
		    }

		    set col $data(activeCol)
		    while 1 {
			incr col $amount
			if {$col < 0 || $col > $data(lastCol)} {
			    return ""
			} elseif {!$data($col-hide)} {
			    condChangeSelection $win $row $col
			    return ""
			}
		    }
		}
	    }
	}
    } else {
	#
	# Toggle the state of the expand/collapse control
	#
	set how [expr {[string match "<Control-*>" $event] ?
		       "-fully" : "-partly"}]
	if {[::$win cget -showbusycursor]} { ::$win setbusycursor }
	::$win $op $row $how				;# can take long
	::$win restorecursor
    }
}

#------------------------------------------------------------------------------







<
<
<
<
|
|
|
|

|
|
|
|

|
|
|
|
|
|
|
|
<








|
|







2866
2867
2868
2869
2870
2871
2872




2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890

2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
		set op "collapse"
	    }
	}
    }

    if {$op eq ""} {
	set amount [expr {[string match "*Right>" $event] ? 1 : -1}]




	switch $data(-selecttype) {
	    row {
		::$win xview scroll $amount units
	    }

	    cell {
		if {$data(editRow) >= 0} {
		    return ""
		}

		set col $data(activeCol)
		while 1 {
		    incr col $amount
		    if {$col < 0 || $col > $data(lastCol)} {
			return ""
		    } elseif {!$data($col-hide)} {
			condChangeSelection $win $row $col
			return ""

		    }
		}
	    }
	}
    } else {
	#
	# Toggle the state of the expand/collapse control
	#
	set how [expr {$event eq "<Left>" || $event eq "<Right>" ?
		       "-partly" : "-fully"}]
	if {[::$win cget -showbusycursor]} { ::$win setbusycursor }
	::$win $op $row $how				;# can take long
	::$win restorecursor
    }
}

#------------------------------------------------------------------------------
Changes to modules/tablelist/scripts/tablelistWidget.tcl.
1105
1106
1107
1108
1109
1110
1111
1112



1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
			 -container 0 -cursor $data(-cursor) -height 2 \
			 -highlightthickness 0 -padx 0 -pady 0 -relief sunken \
			 -takefocus 0
	}
    }

    #
    # Create the body text widget within the main frame



    #
    set w $data(body)
    text $w -borderwidth 0 -exportselection 0 -highlightthickness 0 \
	    -insertwidth 0 -padx 0 -pady 0 -state normal -takefocus 0 -wrap none
    catch {$w configure -undo 0};  # because of a text widget issue in Tk 8.6.6
    bind $w <Configure> { tablelist::bodyConfigure %W %w %h }
    pack $w -expand 1 -fill both
    bindtags $w [list $w $data(bodyTag) TablelistBody $data(topWin) \
		 TablelistKeyNav all]

    #
    # Create the "stripe", "select", "curRow", "active", "disabled", "redraw",
    # "hiddenRow", "elidedRow", "hiddenCol", and "elidedCol" tags in the body
    # text widget.  Don't use the built-in "sel" tag because on Windows the
    # selection in a text widget only becomes visible when the window gets
    # the input focus.  DO NOT CHANGE the order of creation of these tags!







|
>
>
>







|
|







1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
			 -container 0 -cursor $data(-cursor) -height 2 \
			 -highlightthickness 0 -padx 0 -pady 0 -relief sunken \
			 -takefocus 0
	}
    }

    #
    # Create the body text widget within the main frame and replace the
    # binding tag Text with $data(bodyTag), TablelistBody, and
    # TablelistBody2 in the list of its binding tags.  TablelistBody2
    # is needed on the Mac to work around some binding-related problems.
    #
    set w $data(body)
    text $w -borderwidth 0 -exportselection 0 -highlightthickness 0 \
	    -insertwidth 0 -padx 0 -pady 0 -state normal -takefocus 0 -wrap none
    catch {$w configure -undo 0};  # because of a text widget issue in Tk 8.6.6
    bind $w <Configure> { tablelist::bodyConfigure %W %w %h }
    pack $w -expand 1 -fill both
    bindtags $w [list $w $data(bodyTag) TablelistBody TablelistBody2 \
		 $data(topWin) TablelistKeyNav all]

    #
    # Create the "stripe", "select", "curRow", "active", "disabled", "redraw",
    # "hiddenRow", "elidedRow", "hiddenCol", and "elidedCol" tags in the body
    # text widget.  Don't use the built-in "sel" tag because on Windows the
    # selection in a text widget only becomes visible when the window gets
    # the input focus.  DO NOT CHANGE the order of creation of these tags!