473,831 Members | 2,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 11576
In addiiton, I hope it directly support basic HTML grammar.

su***********@g mail.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***********@g mail.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.PhotoIm age 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,stick y=N+S+W+E)

root.columnconf igure(0,weight= 1)
root.rowconfigu re(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
10715
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 urllib.urlopen('http://www.amazon.com').read() ), it becomes too sluggish to use as an "interactive" shell. I have tried wxPython and it seems to have the same problem (from my experience using PyCrust). Is there any way to speed up Text widget, or should I look for another
2
2958
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 ability to stop the text at any point. What I want to be able todo is select a line from the Text() window and double click or whatever on it to open a new window with that selected text as a paramater to the new window.
5
4427
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 this, but most of them don't render the content exactly as it's displayed in Word. Do you know of any scripts/activex/applets that provide this?
0
1344
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---- 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...
2
2858
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 the following: ########################################################## from Tkinter import * root = Tk()
10
1908
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 browser. However, I'm not really sure where to start. I've played with some CMS applications, but they seem more for blogging (mamba, wordpress, etc.). Ideally, I would like to interface with mySQL (or whatever the favorite web-flavor database app is...
5
2975
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 that the pack manager usually handles all of the resize stuff, but I've found an arrangement that the pack manager fails for. That is, if one embeds a canvas into a window created inside a text widget, then resize the text widget (via its container),...
3
1665
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 second, it seems no text will appear in the Text widget until the method exits. Take a look at this snippet: # Assume I have created no threads other than the one that comes
5
1357
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. (See code comments for how I stumbled into this.) It's here: http://www.martinrinehart.com/examples/clicker.html Constructive peer review of the code is most welcome.
0
9642
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10534
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10208
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7748
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 presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5620
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5785
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4417
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3076
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.