GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sun Aug 28, 2016 5:09 am

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Setting Mouse Cursor in GtkTreeView
PostPosted: Mon Oct 08, 2012 3:08 pm 

Joined: Wed Jun 27, 2012 8:29 pm
Posts: 4
I am trying to change the mouse cursor of a textview widget. Here is what i have tried so far:

#include <gtk/gtk.h>

GtkWidget *Add_To_Scrolled_Window(GtkWidget *widget,int width,int height)
   GtkWidget *scrolled_window;
   scrolled_window = gtk_scrolled_window_new(NULL,NULL);
   if(height != 0 && width != 0)


   return scrolled_window;

void Title_Box(GtkWidget *vbox,char *title_msg)
   GtkWidget     *scrolled_window,*textview;
   GtkTextBuffer *buffer;
   GtkTextIter   iter;
   GdkCursor     *cur;
   GdkWindow     *window;
   textview = gtk_text_view_new();
   buffer    = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview));
   cur      = gdk_cursor_new(GDK_ARROW);   
   window   = gtk_text_view_get_window (GTK_TEXT_VIEW(textview),
   gdk_window_set_cursor(window, cur);




   scrolled_window = Add_To_Scrolled_Window(textview,0,0);

int main(int argc,char **argv)
   GtkWidget *entry_option,*main_box;


   entry_option  = gtk_window_new(GTK_WINDOW_TOPLEVEL);
   main_box      = gtk_vbox_new(FALSE,10);
   Title_Box(main_box,"Text View Mouse Cursor Test");



   return 0;

Its not working. I searched the forum,but none of the answer is working for me. Any help would be appreciated.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: Google [Bot] and 4 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group