wxPython question

Kevin Altis altis at semi-retired.com
Mon Mar 17 00:03:20 CET 2003


In general, you'll want to bring questions like this up on the
wxPython-users mailing list.

  http://www.wxpython.org/maillist.php

You'll get a much larger audience of wxPython programmers looking at your
problem that way. Offhand, I would say you have two options. One as someone
else has suggested is to use HTML, but this may only be good for the output.
With wxPython you'll have the option of using the wxHtmlWindow class or if
you only care about working on the Windows platform you can use the much
more capable wxIEHtmlWin class. The latter can basically do anything that
you can do in Internet Explorer, including support for plug-ins since it
simply wraps the IE ActiveX component. You can even use it for HTML WYSIWYG
editing using one of the many bits of HTML and JavaScript available around
the web such as:

  http://www.insidedhtml.com/tips/contents/ts12/page1.asp

I just verified that it works with the PythonCard simpleIEBrowser sample.

  http://pythoncard.sourceforge.net/samples/simpleIEBrowser.html

The problem with using that for input is that currently, I don't think the
individual events for keystrokes and mouse clicks are propogated up from the
ActiveX wrapper to wxPython. It is probably possible to do so, in the future
more capabilities will likely be added to the wrapper. That means if you
were careful about how you position the input HTML window, the UI might be
workable, simply putting a button outside the HTML for "Send".

Another possibility, is to create your own font or find one on the web that
contains smileys or anything else you want to display. Then you can use the
wxTextCtrl with the wxTE_RICH2 style to display the smileys intermingled
with your other text. That is how people often mix small graphics and text
in other applications and it should work for wxPython too.

ka
---
Kevin Altis
altis at semi-retired.com
http://radio.weblogs.com/0102677/
http://www.pythoncard.org/

"Scott" <syrinx at simplecom.net> wrote in message
news:mpq97vg5n5020m4n2thcpq80divpl287b9 at 4ax.com...
> On Sun, 16 Mar 2003 18:43:59 +0100, "Nikolaus Wagner"
> <usenet.10.quaran at spamgourmet.com> wrote:
>
> >On Sun, 16 Mar 2003 00:06:46 -0600, Scott wrote:
> >
> >> Is there a wxPython control (or wxWindows control that I could wrap)
> >> out there anywhere that behaves like a wxTextCtrl, except that it
> >> allows inclusion of images, eg. "smileys?"  I've had no luck finding
> >> such a beast.  Can anyone help?  Thanks.
> >
> >Do you want do display something containing text and graphics too
> >or do you want a text editor that can handle pictures too?
> >
> >If you just want to display text with images you could use the HTML
> >control (dont know the name, just look at the demo)
>
> I want to make something like a "chat window," which would be a small
> editor control that can display small images amongst the text.  Know
> of anythiing like that?
>






More information about the Python-list mailing list