Is is possible to make the background of wx.html.HtmlWindow
transparent?
What I mean is this:
* create a custom widget that draws its background
* place one or more wx.html.HtmlWindow widgets on it
* instead of the html body background color, the parent's custom
background should appear.
No. You could do the background drawing to a bitmap, save the bitmap to a file, and then have the html document use that image file as its background. There is also a way to do it all in memory, but that is more complex. Search for examples using wx.MemoryFileSystem.
···
On 9/13/11 1:00 PM, nagylzs wrote:
Is is possible to make the background of wx.html.HtmlWindow
transparent?
What I mean is this:
* create a custom widget that draws its background
* place one or more wx.html.HtmlWindow widgets on it
* instead of the html body background color, the parent's custom
background should appear.
No. You could do the background drawing to a bitmap, save the bitmap to
a file, and then have the html document use that image file as its
background. There is also a way to do it all in memory, but that is
more complex. Search for examples using wx.MemoryFileSystem.
Almost there. Everything is prepared, I have a background wx.Bitmap
created. But I don't know how to use wx.MemoryFileSystem. I was
google-ing for 5 minutes, but still cannot find any example with
wx.MemoryFileSystem. I went through my whole site-packages dir
searching for files containing wx.MemoryFileSystem, but there was
nothing. Can you please point me to the right direction?
Almost there. Everything is prepared, I have a background wx.Bitmap
created. But I don't know how to use wx.MemoryFileSystem. I was
google-ing for 5 minutes, but still cannot find any example with
wx.MemoryFileSystem. I went through my whole site-packages dir
searching for files containing wx.MemoryFileSystem, but there was
nothing. Can you please point me to the right direction?
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
#### EXCEPTION: ImportError: No module named ImageInHtml
It works for me -- how are you running it? I ran it from the command line, in the dir where ImageInHtmp.py is.
The trick is that to embed a wx.StaticBitmap in wxHTML, you need to specify the module that it is defined in , and that module needs to be on sys.path.
Anyway, that's for the wx.StaticBitmap demo, you can comment that out and still use the Virtual File system method.
-Chris
···
On 9/17/11 10:16 AM, Ray Pasco wrote:
---- Statement mod = __import__(name)
Line # 233
Function _my_import
File wxpTag.py
File Path C:\PROGRA~2\Python26\lib\SITE-P~1\WX-2~1.8-M\wx\lib\
---- Statement self.ctx.classMod = _my_import(modName)
Line # 133
Function HandleWxpTag
File wxpTag.py
File Path C:\PROGRA~2\Python26\lib\SITE-P~1\WX-2~1.8-M\wx\lib\
---- Statement return self.HandleWxpTag(tag)
Line # 117
Function HandleTag
File wxpTag.py
File Path C:\PROGRA~2\Python26\lib\SITE-P~1\WX-2~1.8-M\wx\lib\
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
#### EXCEPTION: ImportError: No module named ImageInHtml
It works for me -- how are you running it? I ran it from the command
line, in the dir where ImageInHtmp.py is.
The trick is that to embed a wx.StaticBitmap in wxHTML, you need to
specify the module that it is defined in , and that module needs to be
on sys.path.
Yep, this problem can happen sometimes if the sys.path or the cwd is not right when you are using a class from the wxp tag that is in the same module being run as the main script. If another module is the main script and the one with the class being used from <wxp> is imported normally (IOW, just like any normal program that is larger than a simple sample) then this problem will not show up at all.
Anyway, that's for the wx.StaticBitmap demo, you can comment that out
and still use the Virtual File system method.