Re: GtkTextView horizontal seperators...




I was wondering if anyone knows how I could draw a horizontal
red line across a GtkTextView buffer.

I came across this recently. Putting widgets into the textview was not
an option as it was too complex to keep updated as the user edits.

The best solution I found was to just draw directly onto the view
through the expose-event using drawable.draw_line etc.

One gotcha: make sure the exposed window is the text window. i.e. that
it equals textview.get_window(gtk.TEXT_WINDOW_TEXT)

Stephen.
-- 
Stephen Kennedy <stevek gnome org>
http://meld.sf.net visual diff and merge




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]