Thank you Ray and Robin,
I have found a way to make a popup window with a gradient background,
though it is a bit of a kludge.
I tried over-riding the OnPaint method of htmlWindow without success
so I tried a 1x100 pixel gradient as a background image letting it
tile. The issue with this is the background image height must match
the height of the window or it will tile again showing "seams." The
only way I could come up with to resolve this is use a MemoryFShandler
and resize the image to the window height.
bgImg = wx.Image('blueBack.png', wx.BITMAP_TYPE_ANY)
self.demoWindow.SetPage(t)
ir = self.demoWindow.GetInternalRepresentation()
self.demoWindow.SetSize( (ir.GetWidth(), ir.GetHeight()) )
self.SetClientSize(self.demoWindow.GetSize())
bgImg.Rescale(1, ir.GetHeight())
memFs = wx.MemoryFSHandler()
wx.FileSystem_AddHandler(memFs)
memFs.AddFile('bg.png', bgImg, wx.BITMAP_TYPE_PNG)
self.demoWindow.SetPage(t)
memFs.RemoveFile('bg.png')
The SetPage must be called twice, once to determine the size of the
htmlWindow and the second time to add the sized gradient (1 pix wide x
window height).
"<body background="memory:bg.png">" must be used in the html text.
This works good, but there may be a better way.
Here is an image, http://www.BibleAnalyzer.com/files/htmlPopup.jpg
My two cents:
htmlWindow is a very useful control in wxPython but it seems it
receives little attention and improvement from the wx developers. I
even made a suggestion on the wxDev board a year or so ago (desiring
the ability to highlight word cells and/or selections. Container cells
[a whole line] can have their background color changed, but not single
word cells) but just got my hands slapped for wanting and doing
something that is "unsupported" (I kludged up a way to highlight a
line of html on a click that works very well in my app.) I thought one
of the main tenants of programming was innovation and adaptation to
make something new. Oh well.
If anyone wants the code to make an html popup window w/gradient, let
me know and I'll put it up when I get time.
Thanks again, to all.
Tim