tags:

views:

234

answers:

3

I would like to include a rich text editor in a pygtk drawing area for an application i am developing. The editor ( a small resizable widget ) should be able to move around the drawing area like a rectangle. I am not sure how to start as I am pretty new to PyGTK. thank you !

A: 

gtk.TextView is "rich", in that it can display all types of formatting and even embedded widgets.

If you want the functionality of editing rich text, you will have to write something yourself, though others have tried in applications like BloGTK. From which you could steal codes.

Ali A
A: 

You could use GtkLayout instead od GtkDrawingArea. You can place child widgets on GtkLayout and paint on it like on a GtkDrawingArea.

http://library.gnome.org/devel/gtk/stable/GtkLayout.html

el.pescado
A: 

BloGTK seems to use an HTML widget for rich text. Those aren't quite as flexible for plain text.

Here's a link that should be helpful: http://www.kksou.com/php-gtk2/articles/apply-styles-to-GtkTextView-using-GtkTextTag---Part-1.php