pictures as characters in a Tk text box?
Claudio Grondi
claudio.grondi at freenet.de
Sat Sep 2 15:12:20 EDT 2006
Jay wrote:
> Can you do the same in wxPython?
I am a greenhorn in wxPython, so please don't bet on what I state here,
but to my current knowledge wxPython doesn't come with a widget capable
of what Tkinter text box is capable of. But wxPython comes e.g. with a
widget displaying any HTML content, so if you need only to display and
not edit things it is a perfect one to use if you need to mix text with
images and control elements.
Claudio Grondi
>
> Simon Forman wrote:
>
>>Jay wrote:
>>
>>>This may be really obscure, but I had a dream about programming
>>>something like this, so don't blame me. Is it possible to take a small
>>>image or icon and display it as a character in a Tk text box? Think
>>>how Thunderbird displays text smilies as actual smiley icons. Or how
>>>in AIM as you type a smiley, it replaces it with the picture. Does
>>>anyone know how to display these specifically in a Tk text box? Thanks.
>>
>>Dreaming in Python, eh? Maybe you should take a break. ;-)
>>
>>Sure, quoting the link below: "You can put an image or bitmap into a
>>text widget. It is treated as a single character whose size is the
>>natural size of the object."
>>
>>You can also embed any Tk widget in a Tk Text widget, including
>>ImageTks and widgets with bitmaps.
>>
>>See:
>>http://infohost.nmt.edu/tcc/help/pubs/tkinter/text-image.html
>>and
>>http://infohost.nmt.edu/tcc/help/pubs/tkinter/text-window.html
>>
>>
>>HTH,
>>~Simon
>
>
More information about the Python-list
mailing list