Or "How to add a visible (thin) border to GtkTextView"? Is it ever possible?
Thank you in advance.
Years later... but searching the web still gives no good answers to this question.
The solution is quite simple: Just create a GtkFrame
and add the GtkScrolledWindow
containing the GtkTextView
, here is some example code in python:
frame = Gtk.Frame()
scroll = Gtk.ScrolledWindow()
scroll.set_hexpand( True )
scroll.set_border_width( 3 )
textview = Gtk.TextView()
scroll.add( textview )
frame.add( scroll )
After about 9 and a half years later...
I'm going to give a language-independent answer.
First, add a GtkScrolledWindow
, it'll enable scrolling. Now add your GtkTextView
. Then set shadow type to something other than none. It'll show a border around your GtkTextView
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With