Tk Library Source Code

Check-in [941b5bfe92]
Login

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

Overview
Comment:Tablelist: Made the column deletion by orders of magnitude faster.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 941b5bfe9202a60947e84b078007a08431739bd7d530c15de018e72cb8fa7e0c
User & Date: csaba 2025-05-23 19:44:44.441
Context
2025-05-27
10:32
Tsw: Extended the reference manual by a section about choosing between toggleswitch and (ttk::)checkbutton widgets. check-in: 561d20d565 user: csaba tags: trunk
2025-05-23
19:44
Tablelist: Made the column deletion by orders of magnitude faster. check-in: 941b5bfe92 user: csaba tags: trunk
2025-05-21
18:28
Mentry: Updated for version 4.5. See the ChangeLog for details. check-in: f68c45cec8 user: csaba tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to modules/tablelist/CHANGES.txt.
13
14
15
16
17
18
19



20
21
22
23
24
25
26
27
28
29
30
   (again, thanks to Nicolas Bats for reporting that on Windows and
   macOS Aqua this was not always the case).

4. Made sure that in multi-line cell texts the substring "%W" won't be
   substituted by the path name of the tablelist's body (thanks to
   Harald Oehlmann for his bug report).




5. Minor improvements in the demo scripts related to interactive cell
   editing.

6. Improved the documentation by extending the CSS stylesheet used in
   the HTML files.

What was new in Tablelist 7.5?
------------------------------

1. Support for interactive cell editing with the aid of the new
   toggleswitch widget.







>
>
>
|


|







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
   (again, thanks to Nicolas Bats for reporting that on Windows and
   macOS Aqua this was not always the case).

4. Made sure that in multi-line cell texts the substring "%W" won't be
   substituted by the path name of the tablelist's body (thanks to
   Harald Oehlmann for his bug report).

5. Made the column deletion by orders of magnitude faster (thanks to
   Alexandru Dadalau for his bug report).

6. Minor improvements in the demo scripts related to interactive cell
   editing.

7. Improved the documentation by extending the CSS stylesheet used in
   the HTML files.

What was new in Tablelist 7.5?
------------------------------

1. Support for interactive cell editing with the aid of the new
   toggleswitch widget.
Changes to modules/tablelist/scripts/tablelistConfig.tcl.
1534
1535
1536
1537
1538
1539
1540




1541
1542
1543
1544
1545
1546
1547

		genVirtualEvent $win <<TablelistColHiddenStateChanged>> $col
	    }
	}

	-labelalign {
	    if {$val eq ""} {




		#
		# Unset data($col$opt)
		#
		set alignment [lindex $data(colList) [expr {2*$col + 1}]]
		array unset data $col$opt
	    } else {
		#







>
>
>
>







1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551

		genVirtualEvent $win <<TablelistColHiddenStateChanged>> $col
	    }
	}

	-labelalign {
	    if {$val eq ""} {
		if {![info exists data($col$opt)]} {
		    return ""
		}

		#
		# Unset data($col$opt)
		#
		set alignment [lindex $data(colList) [expr {2*$col + 1}]]
		array unset data $col$opt
	    } else {
		#
1571
1572
1573
1574
1575
1576
1577




1578
1579
1580
1581
1582
1583
1584
	}

	-labelbackground -
	-labelforeground {
	    set w $data(hdrTxtFrmLbl)$col
	    set optTail [string range $opt 6 end]	;# remove the -label
	    if {$val eq ""} {




		#
		# Apply the value of the corresponding widget
		# configuration option to the col'th label and
		# its sublabels (if any), and unset data($col$opt)
		#
		configLabel $w -$optTail $data($opt)
		array unset data $col$opt







>
>
>
>







1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
	}

	-labelbackground -
	-labelforeground {
	    set w $data(hdrTxtFrmLbl)$col
	    set optTail [string range $opt 6 end]	;# remove the -label
	    if {$val eq ""} {
		if {![info exists data($col$opt)]} {
		    return ""
		}

		#
		# Apply the value of the corresponding widget
		# configuration option to the col'th label and
		# its sublabels (if any), and unset data($col$opt)
		#
		configLabel $w -$optTail $data($opt)
		array unset data $col$opt
1599
1600
1601
1602
1603
1604
1605




1606
1607
1608
1609
1610
1611
1612
	    }
	}

	-labelborderwidth {
	    set w $data(hdrTxtFrmLbl)$col
	    set optTail [string range $opt 6 end]	;# remove the -label
	    if {$val eq ""} {




		#
		# Apply the value of the corresponding widget configuration
		# option to the col'th label and unset data($col$opt)
		#
		configLabel $w -$optTail $data($opt)
		array unset data $col$opt
	    } else {







>
>
>
>







1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
	    }
	}

	-labelborderwidth {
	    set w $data(hdrTxtFrmLbl)$col
	    set optTail [string range $opt 6 end]	;# remove the -label
	    if {$val eq ""} {
		if {![info exists data($col$opt)]} {
		    return ""
		}

		#
		# Apply the value of the corresponding widget configuration
		# option to the col'th label and unset data($col$opt)
		#
		configLabel $w -$optTail $data($opt)
		array unset data $col$opt
	    } else {
1637
1638
1639
1640
1641
1642
1643




1644
1645
1646
1647
1648
1649
1650
	    }
	}

	-labelfont {
	    set w $data(hdrTxtFrmLbl)$col
	    set optTail [string range $opt 6 end]	;# remove the -label
	    if {$val eq ""} {




		#
		# Apply the value of the corresponding widget
		# configuration option to the col'th label and
		# its sublabels (if any), and unset data($col$opt)
		#
		configLabel $w -$optTail $data($opt)
		array unset data $col$opt







>
>
>
>







1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
	    }
	}

	-labelfont {
	    set w $data(hdrTxtFrmLbl)$col
	    set optTail [string range $opt 6 end]	;# remove the -label
	    if {$val eq ""} {
		if {![info exists data($col$opt)]} {
		    return ""
		}

		#
		# Apply the value of the corresponding widget
		# configuration option to the col'th label and
		# its sublabels (if any), and unset data($col$opt)
		#
		configLabel $w -$optTail $data($opt)
		array unset data $col$opt
1666
1667
1668
1669
1670
1671
1672




1673
1674
1675
1676
1677
1678
1679
	}

	-labelheight -
	-labelpady {
	    set w $data(hdrTxtFrmLbl)$col
	    set optTail [string range $opt 6 end]	;# remove the -label
	    if {$val eq ""} {




		#
		# Apply the value of the corresponding widget configuration
		# option to the col'th label and unset data($col$opt)
		#
		configLabel $w -$optTail $data($opt)
		array unset data $col$opt
	    } else {







>
>
>
>







1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
	}

	-labelheight -
	-labelpady {
	    set w $data(hdrTxtFrmLbl)$col
	    set optTail [string range $opt 6 end]	;# remove the -label
	    if {$val eq ""} {
		if {![info exists data($col$opt)]} {
		    return ""
		}

		#
		# Apply the value of the corresponding widget configuration
		# option to the col'th label and unset data($col$opt)
		#
		configLabel $w -$optTail $data($opt)
		array unset data $col$opt
	    } else {
1714
1715
1716
1717
1718
1719
1720




1721
1722
1723
1724
1725
1726
1727
	    #
	    adjustHeaderHeight $win
	}

	-labelimage {
	    set w $data(hdrTxtFrmLbl)$col
	    if {$val eq ""} {




		if {![info exists data($col-labelwindow)]} {
		    foreach l [getSublabels $w] {
			destroy $l
		    }
		}

		array unset data $col$opt







>
>
>
>







1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
	    #
	    adjustHeaderHeight $win
	}

	-labelimage {
	    set w $data(hdrTxtFrmLbl)$col
	    if {$val eq ""} {
		if {![info exists data($col$opt)]} {
		    return ""
		}

		if {![info exists data($col-labelwindow)]} {
		    foreach l [getSublabels $w] {
			destroy $l
		    }
		}

		array unset data $col$opt
1747
1748
1749
1750
1751
1752
1753




1754
1755
1756
1757
1758
1759
1760
	    updateViewWhenIdle $win
	}

	-labelrelief {
	    set w $data(hdrTxtFrmLbl)$col
	    set optTail [string range $opt 6 end]	;# remove the -label
	    if {$val eq ""} {




		#
		# Apply the value of the corresponding widget configuration
		# option to the col'th label and unset data($col$opt)
		#
		configLabel $w -$optTail $data($opt)
		array unset data $col$opt
	    } else {







>
>
>
>







1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
	    updateViewWhenIdle $win
	}

	-labelrelief {
	    set w $data(hdrTxtFrmLbl)$col
	    set optTail [string range $opt 6 end]	;# remove the -label
	    if {$val eq ""} {
		if {![info exists data($col$opt)]} {
		    return ""
		}

		#
		# Apply the value of the corresponding widget configuration
		# option to the col'th label and unset data($col$opt)
		#
		configLabel $w -$optTail $data($opt)
		array unset data $col$opt
	    } else {
1792
1793
1794
1795
1796
1797
1798




1799
1800
1801
1802
1803
1804
1805
		adjustLabel $win $col $pixels $alignment
	    }
	}

	-labelwindow {
	    set w $data(hdrTxtFrmLbl)$col
	    if {$val eq ""} {




		foreach l [getSublabels $w] {
		    destroy $l
		}

		if {[info exists data($col-labelimage)]} {
		    createSublabels $win $w
		    $w-il configure -image $data($col-labelimage)







>
>
>
>







1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
		adjustLabel $win $col $pixels $alignment
	    }
	}

	-labelwindow {
	    set w $data(hdrTxtFrmLbl)$col
	    if {$val eq ""} {
		if {![info exists data($col$opt)]} {
		    return ""
		}

		foreach l [getSublabels $w] {
		    destroy $l
		}

		if {[info exists data($col-labelimage)]} {
		    createSublabels $win $w
		    $w-il configure -image $data($col-labelimage)
Changes to modules/tablelist/scripts/tablelistWidget.tcl.
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
    # Set up and adjust the columns, and rebuild some columns-related lists
    #
    setupColumns $win \
	[lreplace $data(-columns) [expr {3*$first}] [expr {3*$last + 2}]] 1
    makeColFontAndTagLists $win
    makeSortAndArrowColLists $win
    adjustColumns $win {} 1
    updateViewWhenIdle $win

    #
    # Update the list variable if present
    #
    condUpdateListVar $win

    #







<







7761
7762
7763
7764
7765
7766
7767

7768
7769
7770
7771
7772
7773
7774
    # Set up and adjust the columns, and rebuild some columns-related lists
    #
    setupColumns $win \
	[lreplace $data(-columns) [expr {3*$first}] [expr {3*$last + 2}]] 1
    makeColFontAndTagLists $win
    makeSortAndArrowColLists $win
    adjustColumns $win {} 1


    #
    # Update the list variable if present
    #
    condUpdateListVar $win

    #