wxPython UI refresh
Robin Dunn
robin at stop.spam.alldunn.com
Thu Mar 15 00:59:35 EST 2001
"Wiwih Gunadi" <wcanopy at covad.net> wrote in message
news:98p123$ls$1 at newstest.laserlink.net...
>
> "Vadim Zeitlin" <zeitlin at seth.lpthe.jussieu.fr> wrote in message
> news:slrn9avc13.p8n.zeitlin at seth.lpthe.jussieu.fr...
>
> > Try calling Win32 ::UpdateWindow() directly on the embedded window
> (assuming
> > you can find its HWND somehow) and/or sending it WM_PAINT explicitly
> (again,
> > you need the HWND).
>
> How do I call UpdateWindow in wxPython?? isn't it encapsulated in the
> wxWindow.Refresh() method? I tried it, it didn't work.
>
Vadim was refering to the UpdateWindow function in the win32 api, effectivly
bypassing wxPython. You can get the window's HWND by calling it's GetHandle
method. So something like this:
import win32gui
win32gui.UpdateWindow(window.GetHandle())
>
> >
> > >BTW, Excel is not an ActiveX control is it? i.e. it's impossible to
> "wrap"
> > >Excel like IE with the activexwrapper, right?
> >
> > Wrong, you can embed it, of course. Try putting an Excel table inside a
> Word
> > document and editing it.
>
> Yes, but how to do it in wxPython??
> I tried to load the Excel object library, there isn't the equivalent of
> WebControl object of IE in Excel.
>
> When I tried to MakeActiveXClass() the Excel.Application, it complains
> because it can't find the UI part which leads me to believe that Excel
can't
> be treated as an ActiveX control.
>
I've looked too. None of the CoClass classes in the Excel type library will
instantiate as an ActiveX class. I seem to remember seeing something in
MSDN about MS Office OLE needing contianer objects to implement IViewObject,
or something like that. Maybe that's the problem...
There is a ray of hope however. The WebBrowser ActiveX object (internet
explorer) can view excel workbooks just fine. In the wxPython demo for
ActiveXWrapper_IE type the path of a .xls file into the combo box and it
should load it up fine. I didn't look any further to see what else you
could do with it once it is there... Perhaps this will be enough for your
app?
--
Robin Dunn
Software Craftsman
robin at AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!
More information about the Python-list
mailing list