Index: AdvancedSplash.py
===================================================================
--- AdvancedSplash.py	(revision 72610)
+++ AdvancedSplash.py	(working copy)
@@ -29,6 +29,9 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         pn = os.path.normpath(os.path.join(bitmapDir, "advancedsplash.png"))
         bitmap = wx.Bitmap(pn, wx.BITMAP_TYPE_PNG)
         shadow = wx.WHITE
@@ -38,6 +41,7 @@
                                   AS.AS_CENTER_ON_PARENT |
                                   AS.AS_SHADOW_BITMAP,
                                   shadowcolour=shadow)
+        return frame
 
 #----------------------------------------------------------------------
 
@@ -47,7 +51,15 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    imgname = "lib.agw.advancedsplash"
+    captcallback(win1, imgpath, imgname, addwin=win)
+            
+#----------------------------------------------------------------------
 
+
 overview = AS.__doc__
 
 
Index: AGWInfoBar.py
===================================================================
--- AGWInfoBar.py	(revision 72610)
+++ AGWInfoBar.py	(working copy)
@@ -103,6 +103,10 @@
         
 
     def OnShowMessage(self, event):
+        self.DoShowMessage()
+        
+        
+    def DoShowMessage(self):
         msg = self.message.GetValue()
         flag = flags[self.flags.GetSelection()][0]
         self.info.ShowMessage(msg, flag)
@@ -141,6 +145,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.infobar"
+    win.DoShowMessage()
+    captcallback(win, imgpath, imgname)
+        
+#----------------------------------------------------------------------
 
 
 overview = """<html><body>
Index: AquaButton.py
===================================================================
--- AquaButton.py	(revision 72610)
+++ AquaButton.py	(working copy)
@@ -131,6 +131,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.aquabutton"
+    captcallback(win, imgpath, imgname)
+        
+#----------------------------------------------------------------------
+
 overview = AB.__doc__
 
 if __name__ == '__main__':
Index: AUI.py
===================================================================
--- AUI.py	(revision 72610)
+++ AUI.py	(working copy)
@@ -3006,6 +3006,7 @@
     frame = AuiFrame(parent, -1, "AUI Test Frame", size=(800, 600), log=log)
     frame.CenterOnScreen()
     frame.Show()
+    return frame
 
 
 #---------------------------------------------------------------------------
@@ -3015,6 +3016,7 @@
     frame = ParentFrame(parent)
     frame.CenterOnScreen()
     frame.Show()
+    return frame
 
 #---------------------------------------------------------------------------
 
@@ -3027,17 +3029,22 @@
         b1 = wx.Button(self, -1, " AGW AUI Docking Library ", (50,50))
         self.Bind(wx.EVT_BUTTON, self.OnButton1, b1)
 
-##        b2 = wx.Button(self, -1, " AGW AuiMDIs ", (50, 80))
-##        self.Bind(wx.EVT_BUTTON, self.OnButton2, b2)
+        b2 = wx.Button(self, -1, " AGW AuiMDIs ", (50, 80))
+        self.Bind(wx.EVT_BUTTON, self.OnButton2, b2)
 
 
     def OnButton1(self, event):
-        self.win = MainAUI(self, self.log)
+        self.DoButton1()
+        
+    def DoButton1(self):
+        return MainAUI(self, self.log)
 
-
     def OnButton2(self, event):
-        self.win = MDIAUI(self, self.log)
+        self.DoButton2()
 
+    def DoButton2(self):
+        return MDIAUI(self, self.log)
+
 #----------------------------------------------------------------------
 
 def runTest(frame, nb, log):
@@ -3047,7 +3054,19 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton1()
 
+    imgname = "lib.agw.aui"
+    captcallback(win1, imgpath, imgname)
+    win2 = win.DoButton2()
+
+    captcallback(win2, imgpath, (imgname + "_1"), addwin=win)
+    
+#----------------------------------------------------------------------
+
+
 overview = GetIntroText()
 
 
Index: BalloonTip.py
===================================================================
--- BalloonTip.py	(revision 72610)
+++ BalloonTip.py	(working copy)
@@ -352,8 +352,12 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         self.win = BalloonTipDemo(self, self.log)
         self.win.Show(True)
+        return self.win
 
 #----------------------------------------------------------------------
 
@@ -363,6 +367,14 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    # TODO: how to get tip to show
+    imgname = "lib.agw.baloontip"
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#----------------------------------------------------------------------
 
 overview = BT.__doc__
 
Index: ButtonPanel.py
===================================================================
--- ButtonPanel.py	(revision 72610)
+++ ButtonPanel.py	(working copy)
@@ -864,8 +864,12 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         self.win = ButtonPanelDemo(self)
         self.win.Show(True)
+        return self.win
 
 
 #----------------------------------------------------------------------
@@ -876,8 +880,14 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    imgname = "lib.agw.buttonpanel"
+    captcallback(win1, imgpath, imgname, addwin=win)
+        
+#----------------------------------------------------------------------
 
-
 overview = bp.__doc__
 
 
Index: CubeColourDialog.py
===================================================================
--- CubeColourDialog.py	(revision 72610)
+++ CubeColourDialog.py	(working copy)
@@ -30,14 +30,7 @@
 
 
     def OnButton(self, evt):
-
-        if not hasattr(self, "colourData"):
-            self.colourData = wx.ColourData()
-            
-        self.colourData.SetColour(self.GetBackgroundColour())
-        
-        dlg = CCD.CubeColourDialog(self, self.colourData)
-
+        dlg = self.DoButton()
         if dlg.ShowModal() == wx.ID_OK:
 
             # If the user selected OK, then the dialog's wx.ColourData will
@@ -62,8 +55,20 @@
         # Once the dialog is destroyed, Mr. wx.ColourData is no longer your
         # friend. Don't use it again!
         dlg.Destroy()
+        
+    def DoButton(self):
 
+        if not hasattr(self, "colourData"):
+            self.colourData = wx.ColourData()
+            
+        self.colourData.SetColour(self.GetBackgroundColour())
+        
+        dlg = CCD.CubeColourDialog(self, self.colourData)
+        
+        dlg.Center()
+        return dlg
 
+
 #----------------------------------------------------------------------
 
 def runTest(frame, nb, log):
@@ -72,6 +77,14 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    imgname = "lib.agw.cubecolourdialog"
+    captcallback(win1, imgpath, imgname, addwin=win)
+        
+#----------------------------------------------------------------------
+
 overview = CCD.__doc__
 
 if __name__ == '__main__':
Index: CustomTreeCtrl.py
===================================================================
--- CustomTreeCtrl.py	(revision 72610)
+++ CustomTreeCtrl.py	(working copy)
@@ -2026,8 +2026,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.customtreectrl"
+    captcallback(win, imgpath, imgname)
+        
+#----------------------------------------------------------------------
 
-
 overview = CT.__doc__
 
 
Index: FlatMenu.py
===================================================================
--- FlatMenu.py	(revision 72610)
+++ FlatMenu.py	(working copy)
@@ -846,8 +846,12 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         self.win = FlatMenuDemo(self, self.log)
         self.win.Show(True)
+        return self.win
 
 #----------------------------------------------------------------------
 
@@ -863,6 +867,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.flatmenu"
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+        
+#----------------------------------------------------------------------
 
 overview = FM.__doc__
 
Index: FlatNotebook.py
===================================================================
--- FlatNotebook.py	(revision 72610)
+++ FlatNotebook.py	(working copy)
@@ -969,8 +969,12 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         self.win = FlatNotebookDemo(self, self.log)
         self.win.Show(True)
+        return self.win
 
 #----------------------------------------------------------------------
 
@@ -980,6 +984,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.flatnotebook"
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+        
+#----------------------------------------------------------------------
 
 overview = FNB.__doc__
 
Index: FloatSpin.py
===================================================================
--- FloatSpin.py	(revision 72610)
+++ FloatSpin.py	(working copy)
@@ -464,6 +464,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.floatspin"
+    captcallback(win, imgpath, imgname)
+        
+#----------------------------------------------------------------------
+
 overview = FS.__doc__
 
 if __name__ == '__main__':
Index: FoldPanelBar.py
===================================================================
--- FoldPanelBar.py	(revision 72610)
+++ FoldPanelBar.py	(working copy)
@@ -918,29 +918,53 @@
         self.SetSizer(bdr)
 
     def OnButton1(self, evt):
+        self.DoButton1(self)
+            
+    def DoButton1(self):
         frame = Extended(self, title="FoldPanelBar Extended Demo")
         frame.Show()
+        return frame
 
     def OnButton2(self, evt):
+        self.DoButton2(self)
+            
+    def DoButton2(self):
         frame = Collapsed(self, title="FoldPanelBar Collapsed Demo")
         frame.Show()
+        return frame
 
     def OnButton3(self, evt):
+        self.DoButton3(self)
+            
+    def DoButton3(self):
         frame = NotCollapsed(self, title="FoldPanelBar NotCollapsed Demo")
         frame.Show()
+        return frame
     
 
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
-
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.foldpanelbar"
+    
+    win1 = win.DoButton1()
+    captcallback(win1, imgpath, imgname)
+        
+    win2 = win.DoButton2()
+    captcallback(win2, imgpath, imgname + "_1")
 
+    win3 = win.DoButton3()
+    captcallback(win3, imgpath, imgname + "_2", addwin=win)
+
+#----------------------------------------------------------------------
+
 overview = fpb.__doc__
 
 
Index: FourWaySplitter.py
===================================================================
--- FourWaySplitter.py	(revision 72610)
+++ FourWaySplitter.py	(working copy)
@@ -276,8 +276,12 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         self.win = FourWaySplitterDemo(self, self.log)
         self.win.Show(True)
+        return self.win
 
 #----------------------------------------------------------------------
 
@@ -287,6 +291,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.fourwaysplitter"
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+        
+#----------------------------------------------------------------------
 
 overview = FWS.__doc__
 
Index: GenericMessageDialog.py
===================================================================
--- GenericMessageDialog.py	(revision 72610)
+++ GenericMessageDialog.py	(working copy)
@@ -139,7 +139,11 @@
             
 
     def OnShowDialog(self, event):
-
+        dlg = self.DoShowDialog()
+        dlg.ShowModal()
+        dlg.Destroy()
+        
+    def DoShowDialog(self):
         btnStyle = 0
         for child in self.mainPanel.GetChildren():
             if isinstance(child, wx.CheckBox) and child not in [self.useExtended, self.customIcons]:
@@ -183,10 +187,11 @@
 
         dlg.SetExtendedMessage(extended)        
         dlg.SetIcon(images.Mondrian.GetIcon())
-        dlg.ShowModal()
-        dlg.Destroy()
+        dlg.Center()
+        dlg.Show()
+        dlg.Update()
+        return dlg
 
-
 #----------------------------------------------------------------------
 
 def runTest(frame, nb, log):
@@ -195,6 +200,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.genericmessagedialog"
+    win1 = win.DoShowDialog()
+    captcallback(win1, imgpath, imgname, addwin=win)
+        
+#----------------------------------------------------------------------
 overview = GMD.__doc__
 
 if __name__ == '__main__':
Index: GradientButton.py
===================================================================
--- GradientButton.py	(revision 72610)
+++ GradientButton.py	(working copy)
@@ -144,6 +144,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.gradientbutton"
+    captcallback(win, imgpath, imgname)
+        
+#----------------------------------------------------------------------
 overview = GB.__doc__
 
 if __name__ == '__main__':
Index: HyperLinkCtrl.py
===================================================================
--- HyperLinkCtrl.py	(revision 72610)
+++ HyperLinkCtrl.py	(working copy)
@@ -128,6 +128,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.hyperlinkctrl"
+    captcallback(win, imgpath, imgname)
+        
+#----------------------------------------------------------------------
 
 
 overview = hl.__doc__
Index: HyperTreeList.py
===================================================================
--- HyperTreeList.py	(revision 72610)
+++ HyperTreeList.py	(working copy)
@@ -2513,8 +2513,12 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         self.win = HyperTreeListDemo(self, self.log)
         self.win.Show(True)
+        return self.win
 
 #----------------------------------------------------------------------
 
@@ -2524,6 +2528,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.hypertreelist"
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+        
+#----------------------------------------------------------------------
 
 overview = HTL.__doc__
 
Index: KnobCtrl.py
===================================================================
--- KnobCtrl.py	(revision 72610)
+++ KnobCtrl.py	(working copy)
@@ -174,6 +174,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.knobctrl"
+    captcallback(win, imgpath, imgname)
+        
+#----------------------------------------------------------------------
+
 overview = KC.__doc__
 
 if __name__ == '__main__':
Index: LabelBook.py
===================================================================
--- LabelBook.py	(revision 72610)
+++ LabelBook.py	(working copy)
@@ -543,8 +543,12 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+    
+    def DoButton(self):
         self.win = LabelBookDemo(self, self.log)
         self.win.Show(True)
+        return self.win
 
 #----------------------------------------------------------------------
 
@@ -554,6 +558,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.labelbook"
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+        
+#----------------------------------------------------------------------
 
 overview = LB.__doc__
 
Index: ListCtrl.py
===================================================================
--- ListCtrl.py	(revision 72610)
+++ ListCtrl.py	(working copy)
@@ -370,6 +370,12 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.listctrl"
+    captcallback(win, imgpath, imgname)
+        
+#----------------------------------------------------------------------
 
 overview = """\
 <html>
Index: MultiDirDialog.py
===================================================================
--- MultiDirDialog.py	(revision 72610)
+++ MultiDirDialog.py	(working copy)
@@ -72,7 +72,21 @@
         
 
     def OnShowDialog(self, event):
+        
+        dlg = self.DoShowDialog()
+        if dlg.ShowModal() != wx.ID_OK:
+            self.log.write("You Cancelled The Dialog!\n")
+            dlg.Destroy()
+            return
 
+        paths = dlg.GetPaths()
+        for indx, path in enumerate(paths):
+            self.log.write("Path %d: %s\n"%(indx+1, path))
+            
+        dlg.Destroy()
+        
+    def DoShowDialog(self):
+
         dlgStyle = 0
         for child in self.mainPanel.GetChildren():
             if isinstance(child, wx.CheckBox):
@@ -84,18 +98,10 @@
                                  agwStyle=dlgStyle)
         
         dlg.SetIcon(images.Mondrian.GetIcon())
-        if dlg.ShowModal() != wx.ID_OK:
-            self.log.write("You Cancelled The Dialog!\n")
-            dlg.Destroy()
-            return
+        dlg.Center()
+        dlg.Show()
+        return dlg
 
-        paths = dlg.GetPaths()
-        for indx, path in enumerate(paths):
-            self.log.write("Path %d: %s\n"%(indx+1, path))
-            
-        dlg.Destroy()
-
-
 #----------------------------------------------------------------------
 
 def runTest(frame, nb, log):
@@ -104,6 +110,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.multidirdialog"
+    win1 = win.DoShowDialog()
+    captcallback(win1, imgpath, imgname, addwin=win)
+        
+#----------------------------------------------------------------------
 
 overview = MDD.__doc__
 
Index: PeakMeter.py
===================================================================
--- PeakMeter.py	(revision 72610)
+++ PeakMeter.py	(working copy)
@@ -181,6 +181,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.peakmeter"
+    captcallback(win, imgpath, imgname)
+        
+#----------------------------------------------------------------------
+
 overview = PM.__doc__
 
 if __name__ == '__main__':
Index: PieCtrl.py
===================================================================
--- PieCtrl.py	(revision 72610)
+++ PieCtrl.py	(working copy)
@@ -190,6 +190,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.piectrl"
+    captcallback(win, imgpath, imgname)
+        
+#----------------------------------------------------------------------
+
 overview = docs
 
 if __name__ == '__main__':
Index: PyBusyInfo.py
===================================================================
--- PyBusyInfo.py	(revision 72610)
+++ PyBusyInfo.py	(working copy)
@@ -31,19 +31,22 @@
 
     def OnButton(self, evt):
         
-        evt.Skip()
+        self.DoButton()
+        for indx in xrange(5):
+            wx.MilliSleep(1000)
+
+        del busy
+        
+    def DoButton(self):
+        
         message = "Please wait 5 seconds, working..."
         busy = PBI.PyBusyInfo(message, parent=None, title="Really Busy",
                               icon=images.Smiles.GetBitmap())
 
         wx.Yield()
+        return busy
         
-        for indx in xrange(5):
-            wx.MilliSleep(1000)
-
-        del busy
         
-        
 #----------------------------------------------------------------------
 
 def runTest(frame, nb, log):
@@ -52,6 +55,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.pybusyinfo"
+    win1 = win.DoButton()
+    captcallback(win1._infoFrame, imgpath, imgname, addwin=win)
+        
+#----------------------------------------------------------------------
 
 overview = PBI.__doc__
 
Index: PyCollapsiblePane.py
===================================================================
--- PyCollapsiblePane.py	(revision 72610)
+++ PyCollapsiblePane.py	(working copy)
@@ -296,6 +296,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.pycollapsiblepane"
+    captcallback(win, imgpath, imgname)
+        
+#----------------------------------------------------------------------
 overview = PCP.__doc__
 
 if __name__ == '__main__':
Index: PyGauge.py
===================================================================
--- PyGauge.py	(revision 72610)
+++ PyGauge.py	(working copy)
@@ -152,6 +152,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.pygauge"
+    captcallback(win, imgpath, imgname)
+        
+#----------------------------------------------------------------------
+
 overview = PG.__doc__
 
 if __name__ == '__main__':
Index: PyProgress.py
===================================================================
--- PyProgress.py	(revision 72610)
+++ PyProgress.py	(working copy)
@@ -145,6 +145,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.pyprogress"
+    captcallback(win, imgpath, imgname)
+        
+#----------------------------------------------------------------------
+
 overview = PP.__doc__
 
 if __name__ == '__main__':
Index: RulerCtrl.py
===================================================================
--- RulerCtrl.py	(revision 72610)
+++ RulerCtrl.py	(working copy)
@@ -431,8 +431,12 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         self.win = RulerCtrlDemo(self, self.log)
         self.win.Show(True)
+        return self.win
 
 #----------------------------------------------------------------------
 
@@ -442,6 +446,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.rulerctrl"
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+        
+#----------------------------------------------------------------------
 
 overview = RC.__doc__
 
Index: ShapedButton.py
===================================================================
--- ShapedButton.py	(revision 72610)
+++ ShapedButton.py	(working copy)
@@ -569,8 +569,12 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         self.win = ShapedButtonDemo(self, self.log)
         self.win.Show(True)
+        return self.win
 
 #----------------------------------------------------------------------
 
@@ -590,6 +594,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.shapedbutton"
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+        
+#----------------------------------------------------------------------
 
 overview = docs
 
Index: ShortcutEditor.py
===================================================================
--- ShortcutEditor.py	(revision 72610)
+++ ShortcutEditor.py	(working copy)
@@ -163,22 +163,19 @@
         self.MakeMenuBar()
         self.MakeAcceleratorTable()
 
-        dlg = SE.ShortcutEditor(self)
-        dlg.FromMenuBar(self)
-        dlg.FromAcceleratorTable(self.accelTable)
+        self.dlg = SE.ShortcutEditor(self)
+        self.dlg.FromMenuBar(self)
+        self.dlg.FromAcceleratorTable(self.accelTable)
 
-        self.AddTopMenuBitmaps(dlg)        
+        self.AddTopMenuBitmaps(self.dlg)        
 
-        dlg.Bind(SE.EVT_SHORTCUT_CHANGING, self.OnShortcutChanging)
-        dlg.Bind(SE.EVT_SHORTCUT_CHANGED, self.OnShortcutChanged)
+        self.dlg.Bind(SE.EVT_SHORTCUT_CHANGING, self.OnShortcutChanging)
+        self.dlg.Bind(SE.EVT_SHORTCUT_CHANGED, self.OnShortcutChanged)
         
         self.CenterOnScreen()
         self.Show()
         self.Raise()
 
-        wx.CallAfter(self.ShowDialog, dlg)
-
-
     def MakeMenuBar(self):
 
         bar = wx.MenuBar()
@@ -375,7 +372,13 @@
 
 
     def OnButton1(self, event):
+        win = self.DoButton1()
+        win.ShowDialog(win.dlg)
+        win.Close()
+                
+    def DoButton1(self):
         self.win = ShortcutEditorDemo(self, self.log)
+        return self.win
 
 #----------------------------------------------------------------------
 
@@ -385,8 +388,15 @@
     return win
 
 #----------------------------------------------------------------------
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.shortcuteditor"
+    win1 = win.DoButton1()
+    captcallback(win1.dlg, imgpath, imgname, addwin=win)
+    win1.Close()    
+        
+#----------------------------------------------------------------------
 
-
 overview = open(HTML_HELP, 'rt').read()
 
 
Index: SpeedMeter.py
===================================================================
--- SpeedMeter.py	(revision 72610)
+++ SpeedMeter.py	(working copy)
@@ -644,6 +644,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.speedmeter"
+    captcallback(win, imgpath, imgname)
+        
+#----------------------------------------------------------------------
+
 overview = SM.__doc__
 
 if __name__ == '__main__':
Index: SuperToolTip.py
===================================================================
--- SuperToolTip.py	(revision 72610)
+++ SuperToolTip.py	(working copy)
@@ -225,7 +225,7 @@
         toolTipSizer.Add(self.toolTipButton, 1, wx.ALL|wx.EXPAND, 5)
         toolTipSizer_1.Add(self.generateTip, 0, wx.ALL, 5)
         toolTipSizer.Add(toolTipSizer_1, 0, wx.EXPAND, 0)
-        mainSizer.Add(toolTipSizer, 1, wx.ALL|wx.EXPAND, 5)
+        mainSizer.Insert(0, toolTipSizer, 1, wx.ALL|wx.EXPAND, 5)
         self.mainPanel.SetSizer(mainSizer)
         mainSizer.Layout()
         frameSizer.Add(self.mainPanel, 1, wx.EXPAND, 0)
@@ -281,6 +281,10 @@
             
 
     def OnGenerateTip(self, event):
+        
+        self.DoGenerateTip()
+        
+    def DoGenerateTip(self):
 
         if self.stylesRadio.GetValue():
             # Using a predefined style
@@ -368,20 +372,32 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
 
-        SuperToolTipDemo(self)
+        stt = SuperToolTipDemo(self)
+        return stt
 
 
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
-
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.supertooltip"
+    win1 = win.DoButton()
+    win1.DoGenerateTip()
+    win1.tip.DoShowNow()
+    captcallback(win1.tip.GetTipWindow(), imgpath, imgname, addwin=[win, 
+                                                                    win1])
+        
+#----------------------------------------------------------------------
 
 overview = STT.__doc__
 
Index: ThumbnailCtrl.py
===================================================================
--- ThumbnailCtrl.py	(revision 72610)
+++ ThumbnailCtrl.py	(working copy)
@@ -593,8 +593,12 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         self.win = ThumbnailCtrlDemo(self, self.log)
         self.win.Show(True)
+        return self.win
 
 #----------------------------------------------------------------------
 
@@ -614,6 +618,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.thumbnailctrl"
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win, sleep=2)
+        
+#----------------------------------------------------------------------
 
 overview = TC.__doc__
 
Index: ToasterBox.py
===================================================================
--- ToasterBox.py	(revision 72610)
+++ ToasterBox.py	(working copy)
@@ -400,6 +400,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.toasterbox"
+    captcallback(win, imgpath, imgname)
+        
+#----------------------------------------------------------------------
+
 overview = TB.__doc__
 
 if __name__ == '__main__':
Index: UltimateListCtrl.py
===================================================================
--- UltimateListCtrl.py	(revision 72610)
+++ UltimateListCtrl.py	(working copy)
@@ -67,6 +67,19 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    count = 1
+    imgname = "lib.agw.ultimatelistctrl"
+    # TODO: Windows7Explorer_Contents takes too long, i.e. hangs
+    for mod in buttonDefs.values()[:-2]:
+        modName = mod[0]
+        module = __import__(modName)
+        frame = module.TestFrame(None, log)
+        frame.Show(True)
+        captcallback(frame, imgpath, (imgname + "_%s" % count), sleep=count)
+        count += 1
+    
+#----------------------------------------------------------------------
 
 
 overview = ULC.__doc__
Index: ZoomBar.py
===================================================================
--- ZoomBar.py	(revision 72610)
+++ ZoomBar.py	(working copy)
@@ -218,6 +218,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    imgname = "lib.agw.zoombar"
+    captcallback(win, imgpath, imgname)
+        
+#----------------------------------------------------------------------
 
 overview = ZB.__doc__
 
