update a textview while the mouse moves over a button



 I have a small textview which tells/helps the user what to do,
so when a user moves his mouse onto a button i'd like to show small message
in the textview

I am so far that a g_print prints it message on a mouseover, but the buffer
is not updated
and i get this message:

gtk_text_buffer_set_text: assertion `GTK_IS_TEXT_BUFFER (buffer)' failed

this is my function:

test_func(gpointer data){

   gtk_text_buffer_set_text(data, "Test", -1);
}

the textview and buffer:

crypto_textview = gtk_text_view_new();
   crypto_buffer =
gtk_text_view_get_buffer(GTK_TEXT_VIEW(crypto_textview));
 gtk_fixed_put(GTK_FIXED (crypto_fixed), crypto_textview, 180, 8);
 gtk_widget_set_size_request (crypto_textview, 400, 60);
 gtk_text_buffer_set_text(crypto_buffer, "Hello", -1);
     gtk_widget_show(crypto_textview);

and the call:
g_signal_connect(G_OBJECT(crypto_mount_box), "enter", G_CALLBACK(test_func),
crypto_buffer);

crypto_mount_box is my button

searching the list and google didnt really help for me, maybe its to late
for me :(

thx



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]