473,405 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

pictures as characters in a Tk text box?

Jay
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.

Sep 1 '06 #1
4 2171
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/pub...ext-image.html
and
http://infohost.nmt.edu/tcc/help/pub...xt-window.html
HTH,
~Simon

Sep 2 '06 #2
Jay
PERFECT!!! Thanks so much!
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/pub...ext-image.html
and
http://infohost.nmt.edu/tcc/help/pub...xt-window.html
HTH,
~Simon
Sep 2 '06 #3
Jay
Can you do the same in wxPython?

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/pub...ext-image.html
and
http://infohost.nmt.edu/tcc/help/pub...xt-window.html
HTH,
~Simon
Sep 2 '06 #4
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/pub...ext-image.html
and
http://infohost.nmt.edu/tcc/help/pub...xt-window.html
HTH,
~Simon

Sep 2 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Charles Robinson III | last post by:
How do I make Access display pictures within a form view as linked objects, so that the pictures which I am linking to are displayed within the database? I have a seperate folder for pictures to be...
2
by: Siv | last post by:
Hi, I have written an application which is used by sales staff when discussing products with their customers over the phone. It is a database application that holds detailed information about...
4
by: bugbear | last post by:
Hello; I have (tried) to change my geocities site to be "styled" not "tabled". It's certainly made the HTML nicer. But it doesn't work as nicely I'd like. And it almost doesn't work at...
0
by: George Race | last post by:
I am trying to display pictures in either ReportViewer or Crystal Reports, using VB 2005. I have the path to pictures in a Form text box that is linked to the database containing the full path to...
4
by: Zeljko Bilandzija | last post by:
Hy, could someone help me in this: In design mode, i want to put pictures in database. I made column named pics, and its type as image. How can I put pictures or some address of these pictures...
3
by: rudeman76 | last post by:
Hello, I am working on an incident form. I have 4 set text boxes and up to 4 drop-down boxes on the form. The user enters in the date then time. I have 4 option buttons for the user to select...
1
by: recordlovelife | last post by:
Hey, im not sure if this is javascript, but i thought it would be (if anyone knows a better Cross Browser compatible way, let me know...) Image if you will a blog entry, and at the end of the...
0
by: TOPSie | last post by:
I used http://support.microsoft.com/kb/316383/en-us as the basis of some code to generate a Word document using VB code (.NET2005). In the code I have a loop which produces a table and in the...
1
oranoos3000
by: oranoos3000 | last post by:
hi would you please help me i have a online shopping center that i show pictures of the my product in home page. in the InterExplorer pictures is shown correctly but in Firefox browser is shown...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.