Hmm. That still just takes a picture of the screen (including the
Windows menu bar). Albeit in the correct overall size. I need to get
a hold of the actual buffer behind the WxScrolledWindow.
Here is a simplified version of what I am trying to do:
from wxPython.wx import *
from wxPython.xrc import *
class scrollFrame(wxFrame):
def __init__(self):
wxFrameinit__(self,None,-1,"Title",size=wxSize(300,400))
self.scroll=wxScrolledWindow(self,-1)
x = 20
y = 20
for i in range(50):
st=wxStaticText(self.scroll, -1, " Text %d : " %(i),
pos=wxPoint(x,y))
w,h = st.GetSizeTuple()
tc=wxTextCtrl(self.scroll,-1, pos=wxPoint(x+w+5, y))
dy = h + 10
y += dy
self.scroll.SetScrollbars(0,dy,0,y/dy+1)
self.Show(1)
class MyApp( wx.App ):
def Init( self ):
self.frame2 = scrollFrame()
((300,1200))
panelDC = wx.ClientDC(self.frame2.scroll)
panelWidth, panelHeight = ()
bm = wx.EmptyBitmap(panelWidth, panelHeight)
temp_dc = wx.MemoryDC()
temp_dc.S(bm)
temp_dc.Blit(0,0, panelWidth, panelHeight, panelDC, 0,0)
bm.SaveFile("aBitmap.bmp", wxBITMAP_TYPE_BMP )
return 1
if __name__ == '__main__':
app = MyApp(0)
app.MainLoop()
Thanks,
Matt
To unsubscribe, e-mail: wxPython-users-unsubscribe (AT) lists (DOT) wxwidgets.org
For additional commands, e-mail: wxPython-users-help (AT) lists (DOT) wxwidgets.org