Search code examples
c++gtk3multiline

Is there an example of a multiline text field in GTK+3 written in c++ without using css?


I'm having trouble figuring out the basic multi-line text field stuff in GTK+3. I was hoping someone could help me out with a simple example with no css formatting. I've done some googling and haven't found anything which I wouldn't have to deconstruct to get at the answer. Thanks.


Solution

  • Alright, I figured out how to do it.

    GtkTextBuffer *textBufferName = gtk_text_buffer_new(NULL);
    GtkWidget *widgetName = gtk_text_view_new_with_buffer(textBufferName);