[wxPython] drag text from internet explorer?

I noticed that the rich text control accepts the drops but I need access to
the text before it gets to the window. Even *with* a wxTextCtrl with the
wxTE_RICH style, as soon as you add a drop target of any kind to it, it will
no longer accept drops from IE.

gb

···

On Sat, 19 Jan 2002 18:49:29 -0800 "Kevin Altis" <altis@semi-retired.com> wrote:

There are other possibilities, but if you use a wxTextCtrl with the
wxTE_RICH style you get drag and drop for free under Windows. You can see
this with many of the PythonCard samples since the multiline component
(TextArea) always uses the wxTE_RICH style in order to reduce differences
between GTK and Windows.

wxPython's demo.py has examples of URLDragAndDrop.

ka

From: Gary Bishop

> There are other possibilities, but if you use a wxTextCtrl with the
> wxTE_RICH style you get drag and drop for free under Windows.
You can see
> this with many of the PythonCard samples since the multiline component
> (TextArea) always uses the wxTE_RICH style in order to reduce
differences
> between GTK and Windows.
>
> wxPython's demo.py has examples of URLDragAndDrop.
>
> ka

I noticed that the rich text control accepts the drops but I need
access to
the text before it gets to the window. Even *with* a wxTextCtrl with the
wxTE_RICH style, as soon as you add a drop target of any kind to
it, it will
no longer accept drops from IE.

Right. I think that's a bug. Simon Kittle was trying to manipulate the
clipboard text in his textRouter sample included with PythonCard and as soon
as we switched to wxTE_RICH it broke. Robin will have to answer this one.

On a related note, Vadim changed the meaning of wxTE_RICH in the wxWindows
cvs, so wxTE_RICH is going to mean RichEdit 1.0 and wxTE_RICH2 will be
RichEdit 2.0. In your code if you expect the behavior of the current
wxTE_RICH you should add something like I'm using in PythonCard.

        try:
            # if we're using a version of wxPython after 2.3.2.1
            # try and use RichEdit2
            richText = wx.wxTE_RICH2
        except:
            richText = wx.wxTE_RICH

Then pass richText as one of your style elements when you initialize the
wxTextCtrl.

ka

···

On Sat, 19 Jan 2002 18:49:29 -0800 "Kevin Altis" <altis@semi-retired.com> > wrote: