<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,19 +1,42 @@
 package require Tk
 
+# This function updates the size of the frame
+proc updateScrollableThing {path} {
+	set frame ${path}.frame
+	set canHeight [winfo height $path]
+	set height [winfo reqheight $frame ]
+
+	if {0} {
+	if {$canHeight &gt; $height} {
+		set height $canHeight
+	}
+	}
+
+	set canWidth [winfo width $path]
+	set width [winfo reqwidth $frame]
+
+	if {$canWidth &gt; $width} {
+		set width $canWidth
+	}
+
+	$path configure -scrollregion [list 0 0 $width $height]
+	$path itemconfigure CONTENTS -height $height -width $width
+}
+
 # This function makes a canvas at path and a frame inside it.
 # It returns the path to the canvas.
 # The frame is at $path.frame
 proc scrollableThing {path} {
-	canvas $path
-	set frame [frame $path.frame]
+	canvas $path 
+	set frame [frame ${path}.frame ]
 	$path create window 0 0 -tags CONTENTS -window $frame -anchor nw
 	# This assumes that everything is in the frame and it's rendered
 	# by 100ms from now
 	after 100 &quot;
-		set height \[winfo reqheight $frame\]
-		set width \[winfo reqwidth $frame\]
-		$path configure -scrollregion \[list 0 0 \$width \$height\]
-		$path itemconfigure CONTENTS -height \$height -width \$width
+		[list updateScrollableThing $path]
+		[list bind $path &lt;Configure&gt; [list updateScrollableThing $path]]
+		[list bind $frame &lt;Configure&gt; [list updateScrollableThing $path]]
 	&quot;
+
 	return $path
 }</diff>
      <filename>market/scrollable.tcl</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>cd0e66f9f0aaea02b576db21370508e4008ec3a0</id>
    </parent>
  </parents>
  <author>
    <name>Christopher Vollick</name>
    <email>psycotica0@gmail.com</email>
  </author>
  <url>http://github.com/singpolyma/xgame/commit/b0479c53b8857eb3f62ae7f2f92d4c4d658ba8d4</url>
  <id>b0479c53b8857eb3f62ae7f2f92d4c4d658ba8d4</id>
  <committed-date>2009-01-07T06:20:49-08:00</committed-date>
  <authored-date>2009-01-07T05:44:28-08:00</authored-date>
  <message>Updated scrollable.tcl

Scrollable has been updated so that it binds the resizemejig to the configure event of the frame or the canvas.

This means that the frame is now always as wide as the canvas, and the scrollarea will always be as tall as it needs to be.

A &quot;commented&quot; out section has been left in.
It does for height what has been done for width.

It can be used, but in this case it seems to work better without it.
Maybe.</message>
  <tree>25e39638437fa9baceb37c40d5be1c7c2814cae6</tree>
  <committer>
    <name>Christopher Vollick</name>
    <email>psycotica0@gmail.com</email>
  </committer>
</commit>
