I have tried it with 
gtk\_set\_text\_view\_editable(GTK\_TEXT\_VIEW(outputfield), FALSE); 
but it does not works. Maybe I have put it in the wrong place, gtk is very sensible to the order, don't know. This is a buffered textview.

Does anyone have idea?

**EDIT:**

Sorry to cpoy paste everything but so far I have no idea where is the problem I don`t know what to leave out.

My code is:

```
GtkTextBuffer *output_buffer;
GtkTextBuffer *input_buffer;

static gboolean delete(GtkWidget *widget, GtkWidget *event, gpointer data)
{
    gtk_main_quit();
    printf("Viszlát és kössz a halakat!\n");
    return FALSE;
}
static void cnt_btn_clicked(GtkWidget *widget, gpointer   data)
{
    gchar* msg = "Connect button clicked\n";
    gtk_text_buffer_insert_at_cursor(output_buffer,msg,strlen(msg));
}
static void dcnt_btn_clicked(GtkWidget *widget, gpointer   data)
{
    gchar* msg = "Disconnect button clicked\n"; 
    gtk_text_buffer_insert_at_cursor(output_buffer,msg,strlen(msg));
}
static void read_btn_clicked(GtkWidget *widget, gpointer   data)
{
    gchar* msg = "Read button clicked\n";
    gtk_text_buffer_insert_at_cursor(output_buffer,msg,strlen(msg));
}
static void aut_btn_clicked(GtkWidget *widget, gpointer   data)
{
    gchar* msg = "Automatic button clicked\n";
    gtk_text_buffer_insert_at_cursor(output_buffer,msg,strlen(msg));
}
static void write_btn_clicked(GtkWidget *widget, gpointer   data)
{
    gchar* msg = "Write button clicked\n";
    gtk_text_buffer_insert_at_cursor(output_buffer,msg,strlen(msg));
}
static void activate (GtkApplication *app, gpointer user_data)
{
    //--Containers--
    GtkWidget *window;
    GtkWidget *notebook;
    GtkWidget *frame;
    GtkWidget *main_hbox;
    GtkWidget *main_leftvbox;
    GtkWidget *main_rightvbox;
    GtkWidget *input_scrollwindow;
    GtkWidget *output_scrollwindow;
    //--Design--
    GdkRGBA bg_window;
        bg_window.red = 0.95;
        bg_window.green = 0.95;
        bg_window.blue = 0.95;
        bg_window.alpha = 1;
    GdkRGBA bg_output;
        bg_output.red = 0.9765625;
        bg_output.green = 0.9375;
        bg_output.blue = 0.8203125;
        bg_output.alpha = 1;
    GdkRGBA bg_input;
        bg_input.red = 1;
        bg_input.green = 1;
        bg_input.blue = 1;
        bg_output.alpha = 1;

    //--Components--
    GtkWidget *main_label;
    GtkWidget *settings_label;
    //--Main window--
        GtkWidget *hseparator1;
        GtkWidget *hseparator2;
        //checkbuttons (checkboxes)
        GtkWidget *checkbutton_uart;
        GtkWidget *checkbutton_i2c;
        GtkWidget *checkbutton_spi0;
        GtkWidget *checkbutton_spi1;
        GtkWidget *checkbutton_ndef;
        //buttons
        GtkWidget *btn_cnt;
        GtkWidget *btn_dcnt;
        GtkWidget *btn_read;
        GtkWidget *btn_aut;
        GtkWidget *btn_write;
        //textfields (textviews)
        GtkWidget *outputfield;//not editable
        GtkWidget *inputfield;//editable

    //--Settings window--
    window = gtk_application_window_new (app);
    gtk_window_set_resizable(GTK_WINDOW(window), FALSE);
    g_signal_connect(window, "delete-event", G_CALLBACK(delete), NULL);
    gtk_container_set_border_width(GTK_CONTAINER(window), 5);
    notebook = gtk_notebook_new();
    //table = gtk_table_new(1,6,TRUE);
    gtk_container_add(GTK_CONTAINER(window),notebook);
    gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP);
    gtk_widget_override_background_color(GTK_WIDGET(notebook), GTK_STATE_NORMAL, &bg_window);
    gtk_widget_show(notebook);
        //--Main tab--
        frame = gtk_frame_new(" Controll NFC devices ");
        gtk_container_set_border_width(GTK_CONTAINER(frame),10);
        gtk_widget_set_size_request(frame,910,610);
        gtk_widget_show(frame);
            main_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 10);
                //--Creating elements in left box--
                main_leftvbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
                    checkbutton_uart = gtk_check_button_new_with_label(" UART");
                    checkbutton_i2c = gtk_check_button_new_with_label(" I2C");
                    checkbutton_spi0 = gtk_check_button_new_with_label(" SPI0.0");
                    checkbutton_spi1 = gtk_check_button_new_with_label(" SPI0.1");
                    hseparator1 = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
                    checkbutton_ndef = gtk_check_button_new_with_label(" NDEF");
                    hseparator2 = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
                    btn_cnt = gtk_button_new_with_label("Connect");
                        g_signal_connect(btn_cnt, "clicked", G_CALLBACK(cnt_btn_clicked), NULL);
                    btn_dcnt = gtk_button_new_with_label("Disconnect");
                        g_signal_connect(btn_dcnt, "clicked", G_CALLBACK(dcnt_btn_clicked), NULL);
                    btn_read = gtk_button_new_with_label("Read");
                        g_signal_connect(btn_read, "clicked", G_CALLBACK(read_btn_clicked), NULL);
                    btn_aut = gtk_button_new_with_label("Automatic");
                        g_signal_connect(btn_aut, "clicked", G_CALLBACK(aut_btn_clicked), NULL);
                    btn_write = gtk_button_new_with_label("Write");
                        g_signal_connect(btn_write, "clicked", G_CALLBACK(write_btn_clicked), NULL);
                //--Placing elements in left box--
                    gtk_box_pack_start(GTK_BOX(main_leftvbox), checkbutton_uart, FALSE, FALSE, 5);
                    gtk_box_pack_start(GTK_BOX(main_leftvbox), checkbutton_i2c, FALSE, FALSE, 5);
                    gtk_box_pack_start(GTK_BOX(main_leftvbox), checkbutton_spi0, FALSE, FALSE, 5);
                    gtk_box_pack_start(GTK_BOX(main_leftvbox), checkbutton_spi1, FALSE, FALSE, 5);
                    gtk_box_pack_start(GTK_BOX(main_leftvbox), hseparator1, FALSE, FALSE, 3);
                    gtk_box_pack_start(GTK_BOX(main_leftvbox), checkbutton_ndef, FALSE, FALSE, 5);
                    gtk_box_pack_start(GTK_BOX(main_leftvbox), hseparator2, FALSE, FALSE, 3);
                    gtk_box_pack_start(GTK_BOX(main_leftvbox), btn_cnt, FALSE, FALSE, 10);
                    gtk_box_pack_start(GTK_BOX(main_leftvbox), btn_dcnt, FALSE, FALSE, 10);
                    gtk_box_pack_start(GTK_BOX(main_leftvbox), btn_read, FALSE, FALSE, 10);
                    gtk_box_pack_start(GTK_BOX(main_leftvbox), btn_aut, FALSE, FALSE, 10);
                    gtk_box_pack_start(GTK_BOX(main_leftvbox), btn_write, FALSE, FALSE, 40);
                //--Creating elements in right box--
                main_rightvbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
                    output_scrollwindow = gtk_scrolled_window_new(NULL, NULL);
                    gtk_scrolled_window_set_min_content_width(GTK_SCROLLED_WINDOW(output_scrollwindow),752);
                    gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(output_scrollwindow),410);
                    gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(output_scrollwindow), GTK_SHADOW_ETCHED_IN);
                        outputfield = gtk_text_view_new();
                            gtk_widget_set_size_request(GTK_WIDGET(outputfield), 790,320);
                            gtk_widget_override_background_color(GTK_WIDGET(outputfield), GTK_STATE_NORMAL, &bg_output);
                            output_buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(outputfield));
                        gtk_container_add(GTK_CONTAINER(output_scrollwindow), outputfield);
                        gtk_text_view_set_editable(GTK_TEXT_VIEW(outputfield), FALSE);
                    input_scrollwindow = gtk_scrolled_window_new(NULL, NULL);
                    gtk_scrolled_window_set_min_content_width(GTK_SCROLLED_WINDOW(input_scrollwindow),752);
                    gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(input_scrollwindow),120);
                    gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(input_scrollwindow), GTK_SHADOW_ETCHED_IN);
                        inputfield = gtk_text_view_new();
                            gtk_text_view_set_editable(GTK_TEXT_VIEW(outputfield), TRUE);
                            gtk_widget_set_size_request(GTK_WIDGET(inputfield), 790,115);
                            input_buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(inputfield));
                            gtk_widget_override_background_color(GTK_WIDGET(inputfield), GTK_STATE_NORMAL, &bg_input);
                        gtk_container_add(GTK_CONTAINER(input_scrollwindow), inputfield);
                //--Placing elements in right box--
                    gtk_box_pack_start(GTK_BOX(main_rightvbox), output_scrollwindow, FALSE, FALSE, 5);
                    gtk_box_pack_start(GTK_BOX(main_rightvbox), input_scrollwindow, FALSE, FALSE, 5);
            //--Placing vertical conatiners in the main box
            gtk_box_pack_start(GTK_BOX(main_hbox), main_leftvbox, FALSE, FALSE, 5);
            gtk_box_pack_start(GTK_BOX(main_hbox), main_rightvbox, FALSE, FALSE, 5);
            gtk_container_add(GTK_CONTAINER(frame), main_hbox);
        main_label = gtk_label_new("  Main  ");
                gtk_notebook_append_page(GTK_NOTEBOOK(notebook), frame, main_label);
        //---Settings tab--
        frame = gtk_frame_new(" Setup Environment and Devices ");
        gtk_container_set_border_width(GTK_CONTAINER(frame),5);
        gtk_widget_set_size_request(frame,910,610);
        gtk_widget_show(frame);
            settings_label = gtk_label_new("Settings Components");
            gtk_container_add(GTK_CONTAINER(frame), settings_label);
            gtk_widget_show(settings_label);
        settings_label = gtk_label_new("Settings");
        gtk_notebook_append_page(GTK_NOTEBOOK(notebook), frame, settings_label);
    gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 0);
    gtk_window_set_title (GTK_WINDOW (window), "NFC-Reader v0.4");
    gtk_widget_show_all(window);
    gtk_main();

}
int main(int argc, char **argv)
{
    GtkApplication *app;
    int status;

    gtk_init(&argc, &argv);
    app = gtk_application_new ("org.gtk.example", G_APPLICATION_FLAGS_NONE);
    g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
    g_signal_connect( app, "delete_event", G_CALLBACK(gtk_window_iconify),NULL);
    status = g_application_run (G_APPLICATION (app), argc, argv);
    g_object_unref (app);//drill1 no;mill no;drill2 yes;temper yes
    return status;
}

```