GtkTextView, part of the GTK+ (GIMP Toolkit), is a widget that displays a GtkTextBuffer.
Questions tagged [gtktextview]
37 questions
1
vote
1 answer
GTK: How to display a fixed-size page of text
I'm just now learning GTK programming, and I can't figure out how to display a "page" of text, M rows of N columns, each position containing a character with a given foreground and background. The size of bounding rectangle will be fixed, and I will…

tgphelps
- 47
- 1
- 4
1
vote
0 answers
When is GtkTextView's preferred size updated?
I have noticed that GtkTextView's preferred size doesn't change immediately after its contents are changed, but only sometime later in event processing.
In following example, when you click the button, the text in GtkTextView is updated via…

Martin Mocko
- 33
- 5
1
vote
0 answers
UTF-8 text format issue in gtk
Gtk-CRITICAL **: gtk_text_buffer_emit_insert: assertion 'g_utf8_validate (text, len, NULL)' failed
The above error comes when I open the popup window containing GtkTextView but this not happen all the time sometimes no error shown and text appear as…

M.Shah
- 111
- 1
- 9
1
vote
2 answers
Gtk +3 TextView application crashes
I have an application using a GtkTextView and GtkTextBuffer. Lines are added to the buffer with the following python code which runs in a separate thread from the main process:
while True:
if aLogQueue.qsize() > 0:
…

Steve Ihnen
- 11
- 6
1
vote
1 answer
Using GtkTextView to display lots of generated text (custom GtkTextBuffer?)
I want to write a Python app that uses GTK (via gi.repository) to display a textual view of a huge amount of data. (Specifically, disassembled instructions from a program, similar to what IDA shows.)
I thought this should be fairly simple: use an…

Rena
- 606
- 7
- 21
1
vote
0 answers
Change Textview's Text Upon Change of ComboBoxText Selection - Gtk+ 3.0 in C
I am building a GUI program that allows users to choose between a few software profiles for them to get written to their USB drive. I have chosen GTK+ 3.0 in C, and my supervisor is aware of my chosen method, so I am not changing it.
What I am…

BigSum
- 61
- 7
1
vote
0 answers
Display string with newline characters in GtkTextView
I used this code to display string to a GtkTextView object:
btsel(database, word, meaning, 50000, &rsize); //B-tree
gtk_text_buffer_set_text(buffer, meaning, -1);
Problem is that it showed the entire string without parsing the newline characters,…

tuanna
- 767
- 1
- 6
- 13
1
vote
1 answer
scroll TextView in ScrolledWindow so that cursor is visible in pyGTK2
I have a Textview in a ScrolledWindow. I have set up a callback on signal "changed" of textbuffer of the textview. Now I need to scroll the ScrolledWindow to the point of the cursor. How do I do that?
self.outgoing =…

thekindlyone
- 509
- 1
- 6
- 21
1
vote
2 answers
GTK - How to update gtktextview/gtkentry? #C
i am creating a basic GROUND CONTROL STATION for a CubeSat, dividing it in two parts: COMMANDS (with no problems) and TELEMETRY. I am using C code and GTK; in the telemetry windowt I need to show some info everytime a telemetry packet is received so…

geomerlin
- 11
- 2
1
vote
1 answer
GTK: change a range of text style in textview
I am writing a C application in Ubuntu using gtk+2.0.
I have a textview to disply chat messages. Every message comes below the time it's sent.
What I want to do is use different font style(e.g. color) to display them.
I find these font chooser and…

Gnijuohz
- 3,294
- 6
- 32
- 47
1
vote
1 answer
GtkTextView cursor alway on center line
I have a GtkTextView, where I would like to be able to center the cursor vertically in the center.
If the cursor is moved, the text should scroll up (or down), but the cursor should still stay in center position.
I tried several things: Adding a…

wolfv
- 323
- 1
- 8
0
votes
0 answers
How serialize a Gtk.Textview buffer in Gtk4
I’m working on a flatpak python+gtk4 application which is, roughly speaking, a text editor, and I need a way to save the contents of a TextView including all the tags.
What I know: In Gtk 4, TextView buffer no longer has built-in serialization…

Kripto
- 46
- 1
- 3
0
votes
1 answer
GtkTextView text coloring not working as expected
I'm trying to use GtkTextView for highlighting C++ style comments in code but it does not seem to work right. I want to create a function that first resets all the highlight to default (black) and then paints only the part of the text that matches…

user2137
- 13
- 1
- 2
0
votes
1 answer
Can I insert a zero-width tagged span in a GtkTextView?
I have a GtkTextView in which I would like to have some non-editable spans embedded in an otherwise freely editable document. The problem is, if I delete all the text between two such spans, they "merge together", in the sense that I can no longer…

Martin DeMello
- 11,876
- 7
- 49
- 64
0
votes
1 answer
GTK3+ TextView add lines of text with different colors per line
I'm slightly stumped right now, i use a TextView as a status log, new lines added whenever something happens, this is the function i use for that, probably not right but it does work however i can't make it add changing the color of the entire…

Brian Sykes
- 71
- 9