473,385 Members | 1,465 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,385 software developers and data experts.

Any Tkinker based rich text widget?

Hi all
I am using the standard python GUI Tkinter as my program's main
interface. Although I know wxPython has some widget to support rich
text widget, but I do not have time to shift to wx---- series. Does
anyone know any Tkinter based widget that support:

1. Blod, Italic, Underline and their combinations.
2. Several most commonly used fonts, like Times New Roman and Arial
3. Multiline text
4. Cross platform support. Available in Linux-RedHat and Mac OS series
and Windows 2000 or above.
5.Image embedding. Support jpeg, gif, bmp. The more the better.
and better support:
Hyperlink, Text color, the more the better.
Thank you so much for help!

Feb 19 '06 #1
4 11488
In addiiton, I hope it directly support basic HTML grammar.

su***********@gmail.com 写道:
Hi all
I am using the standard python GUI Tkinter as my program's main
interface. Although I know wxPython has some widget to support rich
text widget, but I do not have time to shift to wx---- series. Does
anyone know any Tkinter based widget that support:

1. Blod, Italic, Underline and their combinations.
2. Several most commonly used fonts, like Times New Roman and Arial
3. Multiline text
4. Cross platform support. Available in Linux-RedHat and Mac OS series
and Windows 2000 or above.
5.Image embedding. Support jpeg, gif, bmp. The more the better.
and better support:
Hyperlink, Text color, the more the better.


Thank you so much for help!


Feb 19 '06 #2
su***********@gmail.com wrote:
I am using the standard python GUI Tkinter as my program's main
interface. Although I know wxPython has some widget to support rich
text widget, but I do not have time to shift to wx---- series. Does
anyone know any Tkinter based widget that support:

1. Blod, Italic, Underline and their combinations.
2. Several most commonly used fonts, like Times New Roman and Arial
3. Multiline text
4. Cross platform support. Available in Linux-RedHat and Mac OS series
and Windows 2000 or above.
5.Image embedding. Support jpeg, gif, bmp. The more the better.

and better support:
Hyperlink, Text color, the more the better.


Tkinter's standard Text widget can do all this, of course:

http://effbot.org/tag/Tkinter.Text

by default, Tkinter only supports GIF and PPM, but you can use PIL's
ImageTk.PhotoImage class instead of Tkinter's own PhotoImage to get
support for ~30 more formats:

http://www.pythonware.com/products/pil/
http://effbot.org/tag/PIL.ImageTk

to deal with hyperlinks, use tag event bindings:

http://effbot.org/zone/tkinter-text-hyperlink.htm

:::

there's in fact a complete browser built on top of Tk's Text widget:

http://grail.sourceforge.net/

but I don't know how much work it would be to "widgetize" that
application.

hope this helps!

</F>

Feb 19 '06 #3
yes, I have tried Text Widget for quite some time. However, its speed
is far from satisfying.

When it holds more than 20,000 characters, it starts to response quite
slow. When you drag your mouse over some text to select, the selection
is usually done after 0.5second or so. My intent to use this widget is
to compose and process report as long as 30 to 60 pages.

Is it the problem of the Text widget or my usage? the following is the
code for testing Text widget. Run it and paste 20,000 characters, and
then it is retardant....

=======Code Start=========
from Tkinter import *
root=Tk()
root.title("Lab Report Editor")

text=Text(root,height=25)
text.grid(row=0,column=0,sticky=N+S+W+E)

root.columnconfigure(0,weight=1)
root.rowconfigure(0,weight=1)
root.mainloop()
===========Code End===============

Feb 21 '06 #4
Thank you so much for help. It is my honor to get a reply from a
prestigious figure like you.

Feb 21 '06 #5

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

Similar topics

7
by: Jane Austine | last post by:
As you add more items, say text lines, in Text widget, it gets too slow and almost impractical to use on. Take idle for example. If the text gets bigger(e.g. print...
2
by: Tonino | last post by:
Hi, I have a small Tkinter app that gets data from a socket connection to a "server". The app has a Text() widget to display the info that it gets from the socket connection. I have the...
5
by: Justin Kennedy | last post by:
Hi, I have a client that wants to format content in Word, paste it into a textarea, and have the html render exactly as it matches the Word doc. I've tried some scripts out there that offer...
0
by: sullivanz.pku | last post by:
Hi all I am using the standard python GUI Tkinter as my program's main interface. Although I know wxPython has some widget to support rich text widget, but I do not have time to shift to wx----...
2
by: nholtz | last post by:
Is there any way to delete a widget (window) from a Text widget, and then add it back to the Text, without re-creating the original widget. For example, I think I would like to do something like...
10
by: James Stroud | last post by:
Hello All, I am interested in setting up a modest invoicing system for some consulting I am doing. I like the idea of managing this on the web and creating invoices and printing them from a...
5
by: deacon.sweeney | last post by:
Hi, I've been searching for a .resize()-like function to overload much like can be done for the delete window protocol as follows: toplevel.protocol("WM_DELETE_WINDOW", callback) I realize...
3
by: mariox19 | last post by:
Are Tkinter widgets running on their own thread? If I try to make a simple application that will print the letters A to Z to a Tkinter Text widget, and I space the printing of each letter by 1...
5
by: MartinRinehart | last post by:
THIS WIDGET RUNS CORRECTLY IN OPERA. Nothing else. (See previous post.) I've invented a new widget that I've named "clicker." It's like a slider, but it hops immediately to the spot clicked....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.