Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | scrollframe.tcl: use Tk8.7 TIP 518 virtual event <<NoManagedChild>> to resize client frame to 1x1 when last child is unmapped. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | bwidget |
Files: | files | file ages | folders |
SHA3-256: |
f121c862800483fba6bc9234c5cba215 |
User & Date: | oehhar 2018-12-11 09:19:04.651 |
Context
2018-12-11
| ||
09:38 | Remove executable file flag from script and text files check-in: aaa5ff20ff user: oehhar tags: bwidget | |
09:19 | scrollframe.tcl: use Tk8.7 TIP 518 virtual event <<NoManagedChild>> to resize client frame to 1x1 when last child is unmapped. check-in: f121c86280 user: oehhar tags: bwidget | |
2018-12-06
| ||
10:42 | Tag BWidget 1.8.13 check-in: 51aca47e31 user: oehhar tags: bwidget, bwidget-1-9-13 | |
Changes
Changes to ChangeLog.
1 2 3 4 5 6 7 | 2018-12-06 Harald Oehlmann <[email protected]> **** BWidget 1.9.13 tagged **** 2018-11-26 Harald Oehlmann <[email protected]> dialog.c: For Unix, also Bind KP_Enter for default dialog button invokation. Ticket [3e31f04367]. | > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 | 2018-12-11 Harald Oehlmann <[email protected]> scrollframe.tcl: use Tk8.7 TIP 518 virtual event <<NoManagedChild>> to resize client frame to 1x1 when last child is unmapped. 2018-12-06 Harald Oehlmann <[email protected]> **** BWidget 1.9.13 tagged **** 2018-11-26 Harald Oehlmann <[email protected]> dialog.c: For Unix, also Bind KP_Enter for default dialog button invokation. Ticket [3e31f04367]. |
︙ | ︙ |
Changes to scrollframe.tcl.
︙ | ︙ | |||
94 95 96 97 98 99 100 101 102 103 104 105 106 107 | [list ScrollableFrame::_frameConfigure $canvas] # add <unmap> binding: <configure> is not called when frame # becomes so small that it suddenly falls outside of currently visible area. # but now we need to add a <map> binding too bind $frame <Map> \ [list ScrollableFrame::_frameConfigure $canvas] bindtags $path [list $path BwScrollableFrame [winfo toplevel $path] all] return [Widget::create ScrollableFrame $path] } # ---------------------------------------------------------------------------- | > > > > > | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | [list ScrollableFrame::_frameConfigure $canvas] # add <unmap> binding: <configure> is not called when frame # becomes so small that it suddenly falls outside of currently visible area. # but now we need to add a <map> binding too bind $frame <Map> \ [list ScrollableFrame::_frameConfigure $canvas] # Tk 8.7/TIP518 allows to get an event when the last child is removed. # In this case, we should resize to 1x1 pixel. bind $frame <<NoManagedChild>>\ [list ScrollableFrame::_frameNoManagedChild $frame] bindtags $path [list $path BwScrollableFrame [winfo toplevel $path] all] return [Widget::create ScrollableFrame $path] } # ---------------------------------------------------------------------------- |
︙ | ︙ | |||
250 251 252 253 254 255 256 | # use [winfo] to get height & width of frame if {![winfo ismapped $canvas.frame]} { return } set height [_max [winfo height $canvas.frame] [winfo height $canvas]] set width [_max [winfo width $canvas.frame] [winfo width $canvas]] $canvas:cmd configure -scrollregion [list 0 0 $width $height] } | > > > > > > > > > > > | 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | # use [winfo] to get height & width of frame if {![winfo ismapped $canvas.frame]} { return } set height [_max [winfo height $canvas.frame] [winfo height $canvas]] set width [_max [winfo width $canvas.frame] [winfo width $canvas]] $canvas:cmd configure -scrollregion [list 0 0 $width $height] } # ---------------------------------------------------------------------------- # Command ScrollableFrame::_frameNoManagedChild # ---------------------------------------------------------------------------- proc ScrollableFrame::_frameNoManagedChild {frame} { # There are no childs mapped any more, so resize frame to 1x1 $frame configure -width 1 -height 1 # Do not fix size, so set values to 0 $frame configure -width 0 -height 0 } |