Index: /branches/blt4_trunk/configure
===================================================================
--- /branches/blt4_trunk/configure	(revision 6135)
+++ /branches/blt4_trunk/configure	(revision 6136)
@@ -630,7 +630,9 @@
 TK_XLIBSW
 TK_VERSION
+TK_SRC_DIR
 TK_LIB_SPEC
 TK_INC_SPEC
 TCL_VERSION
+TCL_SRC_DIR
 TCL_SHLIB_SUFFIX
 TCL_SHLIB_LDFLAGS
@@ -7349,4 +7351,15 @@
 done
 
+TK_VERSION="8.4"
+for dir in \
+ ${exec_prefix} \
+ ${exec_prefix}/lib ; do
+  tkconfig="${dir}/tkConfig.sh"
+  if test -f "$tkconfig" ; then
+    . $tkconfig
+    break
+  fi
+done
+
 
 # Check whether --with-ffmpeg was given.
@@ -10137,4 +10150,6 @@
 
 MAKE=${make_command}
+
+
 
 
Index: /branches/blt4_trunk/configure.in
===================================================================
--- /branches/blt4_trunk/configure.in	(revision 6135)
+++ /branches/blt4_trunk/configure.in	(revision 6136)
@@ -151,4 +151,15 @@
   if test -f "$tclconfig" ; then
     . $tclconfig
+    break
+  fi
+done
+
+TK_VERSION="8.4"
+for dir in \
+ ${exec_prefix} \
+ ${exec_prefix}/lib ; do
+  tkconfig="${dir}/tkConfig.sh"
+  if test -f "$tkconfig" ; then
+    . $tkconfig
     break
   fi
@@ -451,7 +462,9 @@
 AC_SUBST(TCL_SHLIB_LDFLAGS)
 AC_SUBST(TCL_SHLIB_SUFFIX)
+AC_SUBST(TCL_SRC_DIR)
 AC_SUBST(TCL_VERSION)
 AC_SUBST(TK_INC_SPEC)
 AC_SUBST(TK_LIB_SPEC)
+AC_SUBST(TK_SRC_DIR)
 AC_SUBST(TK_VERSION)
 AC_SUBST(TK_XLIBSW)
Index: /branches/blt4_trunk/gui/scripts/sidebarframe.tcl
===================================================================
--- /branches/blt4_trunk/gui/scripts/sidebarframe.tcl	(revision 6135)
+++ /branches/blt4_trunk/gui/scripts/sidebarframe.tcl	(revision 6136)
@@ -29,4 +29,12 @@
 option add *SidebarFrame.sashCursor sb_h_double_arrow
 
+itk::usual BltScrollset {
+    #empty
+}
+itk::usual BltTkFrame {
+    #empty
+}
+
+
 itcl::class Rappture::SidebarFrame {
     inherit itk::Widget
@@ -56,5 +64,6 @@
     protected method _sash {op x}
     protected method _fixLayout {args}
-    protected method TabIndex { which }
+
+    private method TabIndex { which }
 
     private variable _dispatcher ""  ;# dispatcher for !events
@@ -173,9 +182,6 @@
     #
     itk_component add area {
-        Rappture::Scroller $itk_component(sidebar).area \
-            -xscrollmode auto -yscrollmode auto \
-            -highlightthickness 0
-    }
-    $itk_component(area) contents frame
+        blt::tk::frame $itk_component(sidebar).area
+    }
 
     itk_component add controlbar {
@@ -207,6 +213,6 @@
         blt::tabset $itk_component(controlbar).tabs \
             -highlightthickness 0 -tearoff 0 -side left \
-            -bd 0 -gap 0 -tabborderwidth 1 \
-            -outerpad 1
+            -bd 1 -gap 1 -outerborderwidth 0 \
+            -outerpad 0 -justify center
     } {
         keep -background -cursor
@@ -214,5 +220,5 @@
         rename -highlightbackground -controlbackground controlBackground \
             Background
-        rename -background -controlbackground controlBackground \
+        rename -troughcolor -controlbackground controlBackground \
             Background
     }
@@ -241,5 +247,5 @@
     }
 
-    set f [$itk_component(area) contents]
+    set f $itk_component(area)
     set pname "panel[incr _counter]"
     itk_component add $pname {
@@ -249,5 +255,5 @@
     $itk_component(tabs) insert $pos $pname \
         -image $panel(-icon) -text "" -padx 0 -pady 0 \
-        -command [itcl::code $this _toggleTab $pname]
+        -command [itcl::code $this _toggleTab]
 
     set _title2panel($panel(-title)) $pname
@@ -365,10 +371,9 @@
         $_dispatcher event -idle !layout
     }
-    set n [$itk_component(tabs) index -name $pname]
-    $itk_component(tabs) select $n
+    $itk_component(tabs) select $which
 
     $itk_component(title) configure -text $_panels($pname-title)
 
-    set f [$itk_component(area) contents]
+    set f $itk_component(area)
     foreach w [pack slaves $f] {
         pack forget $w
@@ -497,6 +502,5 @@
         pop open
         select $which
-    } elseif {[$itk_component(tabs) index -name $_selected]
-          == [$itk_component(tabs) index -name $which]} {
+    } elseif {[$itk_component(tabs) index $_selected] == $which} {
         pop close
     } else {
Index: /branches/blt4_trunk/gui/src/Makefile.in
===================================================================
--- /branches/blt4_trunk/gui/src/Makefile.in	(revision 6135)
+++ /branches/blt4_trunk/gui/src/Makefile.in	(revision 6136)
@@ -26,9 +26,12 @@
 LIB_RUNTIME_DIR = @LIB_RUNTIME_DIR@
 CFLAGS          = @CFLAGS@ -fPIC
+TCL_SRC_DIR     = @TCL_SRC_DIR@
 TCL_VERSION     = @TCL_VERSION@
-TCLTK_SRCS	= -I../../../runtime/tcl8.4.19/generic -I../../../runtime/tk8.4.19/generic -I../../../runtime/tk8.4.19/unix
 TCL_LIB_SPEC    = @TCL_LIB_SPEC@
+TK_SRC_DIR      = @TK_SRC_DIR@
 TK_LIB_SPEC     = @TK_LIB_SPEC@
-TK_XLIBSW	= @TK_XLIBSW@
+TK_XLIBSW       = @TK_XLIBSW@
+# FIXME: should be using TK_INCLUDES from TEA_PRIVATE_TK_HEADERS
+TCLTK_INCLUDES  = -I$(TCL_SRC_DIR)/generic -I$(TK_SRC_DIR)/generic -I$(TK_SRC_DIR)/unix
 VTK_VERSION     = @VTK_VERSION@
 VTK_TCL_DIR     = @VTK_TCL_DIR@
@@ -95,5 +98,5 @@
 
 RpListbox.o: RpListbox.c
-	$(CC) $(CC_SWITCHES) $(TCLTK_SRCS) -c $? 
+	$(CC) $(CC_SWITCHES) $(TCLTK_INCLUDES) -c $? 
 .cc.o:
 	$(CXX) $(CXX_SWITCHES) -c $?
Index: /branches/blt4_trunk/gui/src/RpSqueezer.c
===================================================================
--- /branches/blt4_trunk/gui/src/RpSqueezer.c	(revision 6135)
+++ /branches/blt4_trunk/gui/src/RpSqueezer.c	(revision 6136)
@@ -199,6 +199,6 @@
         }
     }
-    Tk_PhotoSetSize(destPhoto, destw, srch);
-    Tk_PhotoPutBlock(destPhoto, &destBlock, 0, 0,
+    Tk_PhotoSetSize(NULL, destPhoto, destw, srch);
+    Tk_PhotoPutBlock(NULL, destPhoto, &destBlock, 0, 0,
         destBlock.width, destBlock.height, TK_PHOTO_COMPOSITE_SET);
 
