Tk Source Code

Check-in [9b8a2f32]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:Revert [d70ef6ed] and [fa9b6483]. ttk::treeview again allows dragging the right edge of the rightmost heading, which is not special in any respect.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-ce470f20fd
Files: files | file ages | folders
SHA3-256: 9b8a2f32130bedf2360db908eacb37ad4ac71699905e04ab1b18afe38d411291
User & Date: fvogel 2019-05-04 13:19:36
Context
2019-05-08
10:14
When changing the -stretch value for a column, columns size must be recomputed before the treeview is redisplayed (at idle time) check-in: f2ef1f87 user: fvogel tags: bug-ce470f20fd
2019-05-04
13:19
Revert [d70ef6ed] and [fa9b6483]. ttk::treeview again allows dragging the right edge of the rightmost heading, which is not special in any respect. check-in: 9b8a2f32 user: fvogel tags: bug-ce470f20fd
13:16
ttk::treeview: when there is at least one stretchable column then there should be no slack at the right (slack should be distributed among the stretchable columns) check-in: 4740a71b user: fvogel tags: bug-ce470f20fd
2019-04-11
21:00
Fix indentation check-in: d70ef6ed user: fvogel tags: bug-ce470f20fd
20:55
Fix [ce470f20fd]: ttk::treeview allows dragging the right edge of the rightmost heading check-in: fa9b6483 user: fvogel tags: bug-ce470f20fd
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to library/ttk/treeview.tcl.

102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
...
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
...
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
#	Sets cursor, active element ...
#
proc ttk::treeview::Motion {w x y} {
    set cursor {}
    set activeHeading {}

    switch -- [$w identify region $x $y] {
	separator {
                   if {[ttk::treeview::LastDisplayColumn $w] ne 
                           [$w identify column $x $y]} {
                       set cursor hresize
                   }
	          }
	heading { set activeHeading [$w identify column $x $y] }
    }

    ttk::setCursor $w $cursor
    ActivateHeading $w $activeHeading
}

................................................................................
    variable State
    set State(pressMode) "resize"
    set State(resizeColumn) [$w identify column $x $y]
}

proc ttk::treeview::resize.drag {w x} {
    variable State
    if {[ttk::treeview::LastDisplayColumn $w] ne $State(resizeColumn)} {
        $w drag $State(resizeColumn) $x
    }
}

proc ttk::treeview::resize.release {w x} {
    $w drop
}

### Heading activation.
................................................................................
#
proc ttk::treeview::BrowseTo {w item} {
    $w see $item
    $w focus $item
    $w selection set [list $item]
}

## LastDisplayColumn -- return the data column identifier of the column
#                       displayed rightmost, in the form #n
#
proc ttk::treeview::LastDisplayColumn {w} {
    set dc [$w cget -displaycolumns]
    if {$dc eq "#all"} {
        return #[llength [$w cget -columns]]
    } else {
        return #[llength $dc]
    }
}

#*EOF*






<
<
<
|
<
<







 







<
|
<







 







<
<
<
<
<
<
<
<
<
<
<
<

102
103
104
105
106
107
108



109


110
111
112
113
114
115
116
...
197
198
199
200
201
202
203

204

205
206
207
208
209
210
211
...
356
357
358
359
360
361
362












363
#	Sets cursor, active element ...
#
proc ttk::treeview::Motion {w x y} {
    set cursor {}
    set activeHeading {}

    switch -- [$w identify region $x $y] {



	separator { set cursor hresize }


	heading { set activeHeading [$w identify column $x $y] }
    }

    ttk::setCursor $w $cursor
    ActivateHeading $w $activeHeading
}

................................................................................
    variable State
    set State(pressMode) "resize"
    set State(resizeColumn) [$w identify column $x $y]
}

proc ttk::treeview::resize.drag {w x} {
    variable State

    $w drag $State(resizeColumn) $x

}

proc ttk::treeview::resize.release {w x} {
    $w drop
}

### Heading activation.
................................................................................
#
proc ttk::treeview::BrowseTo {w item} {
    $w see $item
    $w focus $item
    $w selection set [list $item]
}













#*EOF*