wxpython2.4.2.4 and python 2.3 on redhat 7.1
sample app: output is attached as demo.png
dmo.py
#!/usr/bin/env python
from wxPython.wx import *
import wx
from wxPython.html import wxHtmlWindow, wxHtmlEasyPrinting
from wxPython.lib.rcsizer import RowColSizer
class htmlprint(wx.Frame):
def __init__(self,parent,id,title,t,**kwds):
wx.InitAllImageHandlers()
wx.Frame.__init__(self,parent,id,title,**kwds)
self.html = wxHtmlWindow(self, -1,size=(500,500))
self.html.SetRelatedFrame(self,"Report: %s")
self.html.SetRelatedStatusBar(0)
self.printer = wxHtmlEasyPrinting()
self.html.LoadPage(t)
self.boxmain = wxBoxSizer(wxVERTICAL)
self.boxmain.Add(self.html,1,wxGROW)
self.boxmain.SetItemMinSize(self.html,500,500)
boxsub = wxBoxSizer(wxHORIZONTAL)
btn = wxButton(self, -1, "Print")
boxsub.Add(btn, 1, wxGROW | wxALL, 2)
btn = wxButton(self, -1, "Close")
boxsub.Add(btn, 1, wxGROW | wxALL, 2)
self.boxmain.Add(boxsub,0,wxGROW)
self.SetSizer(self.boxmain)
self.SetAutoLayout(True)
class dmo(wx.App):
def OnInit(self):
t = './demo.html'
anc = htmlprint(None, -1,'',t,pos=(10,10))
self.SetTopWindow(anc)
anc.Show(1)
return True
def main():
app = dmo()
app.MainLoop()
if __name__ == "__main__":
main()
···
On Monday 09 August 2004 09:38 pm, you wrote:
>
> setting the size doesnt work - i put size=(700,700) but the window
> still opens at the minimum sizePlease create a small sample app that shows this problem.
--
regards
kg
http://www.onlineindianhotels.net - fastest hotel search website in the world
http://www.ootygolfclub.org