From: Bernhard S. <Ber...@gm...> - 2010-12-05 22:40:17
|
I have implemented a notebook with several tabs each of which has a ScrollableFrame child. Notebook and ScrollableFrame are from the BWidget package. When a tab is first activated, the scrollbars behave normally. However, when a tab is activated the second time (and from then on always), the scrollbars do not respond any longer. After investigating this issue for a while, I recognized that the tab which is activated last, retains the ability to scroll. Scrollbars behave normally. The scrollbars on all other tabs seem disabled. (They can be made responsive again by making the window smaller until the scrollbar is adjusted automatically. From then on the scrollbars work normally again.) Has anyone seen this problem? Searching the archives has not turned up anything in that direction. The problem seems to be specific to Mac OS X. I could not reproduce it on Windows (ActiveTcl) with the following versions: #tcl_version = 8.6, tcl_patchLevel = 8.6b1.1 #tk_version = 8.6, tk_patchLevel = 8.6b1.1 #BWidget version = 1.9 #tcl_version = 8.5, tcl_patchLevel = 8.5.8 #tk_version = 8.5, tk_patchLevel = 8.5.8 #BWidget version = 1.9 and also not under Cygwin: #tcl_version = 8.4, tcl_patchLevel = 8.4.1 #tk_version = 8.4, tk_patchLevel = 8.4.1 #BWidget version = 1.9.2 My configuration on OS X (10.6.5) is (also ActiveTcl) #tcl_version = 8.6, tcl_patchLevel = 8.6b1.2 #tk_version = 8.6, tk_patchLevel = 8.6b1.2 #BWidget version = 1.9.2 Not sure why ActiveTcl on Windows reports BWidget version 1.9 instead of 1.9.2. I forced Tcl to load my local copy of BWidget by setting auto_path accordingly (folder Library besides the script). The script to reproduce the problem is: -------------------------- set auto_path [file join [file dir [info script]] Library] puts "tcl_version = $tcl_version, tcl_patchLevel = $tcl_patchLevel" puts "tk_version = $tk_version, tk_patchLevel = $tk_patchLevel" puts "BWidget version = [package require BWidget]" proc addTab {nb nr} { set f [$nb insert $nr page$nr -text "Page $nr"] puts "f = $f" set sw [ScrolledWindow $f.sw -relief sunken -borderwidth 2] puts "sw = $sw" set sf [ScrollableFrame $sw.f] puts "sf = $sf" $sw setwidget $sf set subf [$sf getframe] puts "subf = $subf" set lab [label $subf.lab -text "ScrollableFrame $nr"] pack $lab for {set i 0} {$i <= 20} {incr i} { pack [entry $subf.ent$i -width 50] -fill x -pady 4 $subf.ent$i insert end "Text field $i" } pack $sw -fill both -expand yes } set top [toplevel .top] set nb [NoteBook $top.nb] set nrTabs 4 for {set i 0} {$i < $nrTabs} {incr i} { addTab $nb $i } pack $nb $nb raise page0 -------------------------------- I know there are probably newer implementations of Notebook/ScrollableFrame. However, for this project, the script must be backwards compatible to Tcl/Tk 8.4. Therefore BWidget. Any thoughts? Cheers, Bernhard |