Does wxStyledTextCtrl provide anything that would allow for this or is
the only solution to create a new control from low-level widgets (thereby
having to reinvent much of wxStyledTextCtrl)?
And from initial investigations, it looks like it would take a fair bit
of work to get it to support it (and presumable little of it could be
done in Python).
wxTextCtrl doesn't seem to support it either (correct me if I'm wrong).
I believe that I can (begin to) achieve what I want in Tkinter using Tk's
(post-8.0) ability to embed arbitrary widgets in a Text widget. However,
I'd really like to use wxPython as I'm trying to make a wholesale move
from Tkinter to wxPython.
So I guess my more general question is now: are there any plans for
wxTextCtrl to have support for embedding arbitrary controls along the
lines of Tk's Text widget.
Thanks
James (long-time Python fan but wxPython newbie)
···
On Tue, 24 Jun 2003 12:45:31 -0700, "Robin Dunn" <robin@alldunn.com> said:
James Tauber wrote:
> Is it possible to embed non-text widgets in a wxStyledTextCtrl?
>
> I'm interested in building a UI similar to Mathematica's as show in
> http://www.wolfram.com/products/mathematica/tour/page2.html where images
> and equations are embedded in the flow of an interactive prompt.
>
> Does wxStyledTextCtrl provide anything that would allow for this or is
And from initial investigations, it looks like it would take a fair bit
of work to get it to support it (and presumable little of it could be
done in Python).
wxTextCtrl doesn't seem to support it either (correct me if I'm wrong).
I believe that I can (begin to) achieve what I want in Tkinter using Tk's
(post-8.0) ability to embed arbitrary widgets in a Text widget.
IIRC, the Tk Text widget is actually built on top of the Canvas widget, so it can easily do lots of fancy stuff. The native platform controls that wxTextCtrl is built on are all designed for just editing text.
However,
I'd really like to use wxPython as I'm trying to make a wholesale move
from Tkinter to wxPython.
So I guess my more general question is now: are there any plans for
wxTextCtrl to have support for embedding arbitrary controls along the
lines of Tk's Text widget.
If the native widgets get the ability (very unlikely) then wxTextCtrl will too.
Probably better would be to make or wrap a good general purpose Canvas class for wxPython and then build what you need on top of that. There are some possibilities already, the wxArt2d library (huge and a lot of work to wrap, probably overkill for most things,) Chandler's SimpleCanvas and Chris Barker's FloatCanvas.
Another possiblity is wxMozilla, which will have an edit mode.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!