Wray, Paul wrote:
> Hello
> I am having some trouble retrieving text with the
GetText function of
> the IE activeX window
> Passing LoadString some HTML works nicely, and displays
in the window as
> expected.
> Then I try to retrieve immediately using the
GetText(True), and I get
> back som valid but empty html:
> <p> </p>
It can't be done immediately because the text hasn't been
loaded yet.
If you give the component time to load the string then it
will work
fine. For example I just did the following in the widget
inspection
tool in the demo:
>>> obj
<wx.lib.iewin.IEHtmlWindow; proxy of <Swig Object of
type
'wxIEHtmlWindowBase *' at 0x2103530> >
>>> obj.LoadString("wxPython"); print
obj.GetText(True)
True
<P> </P>
>>>
>>> obj.LoadString("<b>Hello</b>
World!")
True
>>> obj.GetText(True)
u'<B>Hello</B> World!'
--
Robin Dunn
Software Craftsman
http://wxPython.org Java
give you jitters? Relax with wxPython!
------------------------------------------------------------
---------
To unsubscribe, e-mail: wxPython-users-unsubscribe lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help lists.wxwidgets.org
|