GtkTextView, part of the GTK+ (GIMP Toolkit), is a widget that displays a GtkTextBuffer.
Questions tagged [gtktextview]
37 questions
16
votes
4 answers
How to make GtkTextView look like GtkEntry?
Or "How to add a visible (thin) border to GtkTextView"? Is it ever possible?
Thank you in advance.

Paulo Freitas
- 13,194
- 14
- 74
- 96
8
votes
3 answers
GtkTextView top/bottom margin?
I would like to know the correct and generally accepted way of adding a top and bottom margin to a GtkTextView that is inside of a GtkScrolledWindow. There are functions to set the left and right margin, which I am…

Sean Bright
- 118,630
- 17
- 138
- 146
6
votes
3 answers
Print the text of GtkTextView
How can I print (for example in a label) the text into a GtkTextView?
For GtkLabel and GtkEntry there are gtk_label_get_text() and gtk_entry_get_text(), but for GtkTextView?

stdio
- 435
- 2
- 7
- 18
5
votes
3 answers
GtkTextView automatically resizing
I'm messing around with GTK and glade for the first time, and I've run across a really annoying issue. When I enter text into a TextView, the TextView automatically resizes larger, pushing other widgets away.
This is a really annoying behavior. I do…

endeavormac
- 659
- 2
- 8
- 18
4
votes
1 answer
GtkTextView size
How do I set the size of GtKTextView? I think I can't use gtk_widget_set_usize.

stdio
- 435
- 2
- 7
- 18
3
votes
1 answer
Multiple cursors with same gtkTextBuffer in different gtkTextView
I am trying to edit the same text (which I have stored in a GtkTextBuffer, but alternatives are welcome) with multiple cursors, each in a separate GtkTextView. I need all cursors to be able to edit the text (and be reflected in the other views).…

foobar
- 33
- 2
3
votes
1 answer
How to set Placeholder text in Gtk.TextView
I have been using Gtk Entry till now which offers set_placeholder_text method to set a placeholder text in it however, looking in the documentation , I found no such method for TextView .
Is there any way I can set placeholder text in Gtk Textview ?

Pawan Sharma
- 1,842
- 1
- 14
- 18
2
votes
1 answer
PyGTK. How to show text in a window's TextView widget upon left click on the status icon
I've got a small PyGTK program, that has a statusicon. Upon left click on the statusicon a window with a TextView should appear and a predefined text should be shown in the TextView widget. My problem is that I don't know how to pass the text to…

Andrii Yurchuk
- 3,090
- 6
- 29
- 40
2
votes
1 answer
How do I set a maximum text width for a GtkTextView?
I have a GtkTextView, and I would like to be able to set a maximum line width for the text. If the width of the TextView exceeds the maximum text width, the extra space should be filled with padding on the left and right on the text. Although Gtk…

user13271846
- 43
- 3
2
votes
1 answer
setting gtk textview selection color with css
I have the following code that works fine to set background and foreground colors for a GtkTextview:
static void
setColor(GtkWidget * widget) {
auto style_context = gtk_widget_get_style_context (widget);
…

edscott
- 71
- 1
- 6
2
votes
1 answer
GTK: Resizing widgets contained in a textview
I have a Gtk.TextView control, and I'm inserting child widgets into it. I'd like to be able to have the children resize to fit the width of the TextView when the form is resized. Is there a built-in way to do this? If not, can anyone suggest a…

JasonFruit
- 7,764
- 5
- 46
- 61
2
votes
0 answers
CSS text-shadow property not working with GtkTextView
Does anyone of you know, why the CSS property text-shadow does not work with GtkTextview? It works pretty well with other widgets. (I tested other CSS properties and they work fine)
Edit: Minimal code snippet demonstrating the problem (in Vala,…

rgba
- 51
- 2
2
votes
2 answers
GtkTextView can't wrap line
Hello I'm using Gtk on C, I need to have a GtkTextView in the middle of my window with many other widgets, I can't make the widget wrap lines. This is a very annoying behavior, anyone have any idea of what am I missing? This is the code I'm using to…

El Developer
- 3,345
- 1
- 21
- 40
2
votes
1 answer
gtktextview highlighting the selection
I am hacking some code within the gtk3 sources.
Now everyone knows that, then you make a selection, the selected text is highlighted by showing it in white on a (usually) orange background.
The question is, where is the code that actually causes…

Charles Lindsey
- 31
- 3
2
votes
2 answers
GTK TextView - creating a static display format
I am trying to simulate a piece of hardware, and this hardware has a static ribbon display.
to do this, I'd like to use a TextView. My display has 10 rows, with 25 columns. So I figured that a TextView should be easy enough.
basically, I would…

jasonmclose
- 1,667
- 4
- 22
- 38