Re: Change cursor



I use this on a member function, with the window realized:

void PlotWindow::change_cursor() {
Glib::RefPtr<Gdk::Window> window=this->get_window();
Gdk::Cursor cursor(Gdk::CROSSHAIR);
window->set_cursor(cursor);
}

I remember I asked this same question a long time ago...


El vie, 28-10-2005 a las 11:10 +0200, Andreas Volz escribi� Am Thu, 27 Oct 2005 12:03:18 -0500 schrieb Bob Caryl:
> 
> > >So how do I change the mouse cursor?
> > >
> > >
> > My bet is that your code is run before your window has been
> > realized. Hence the Gdk::Window pointer returned by get_frame() is no
> > good.
> 
> Hm, I run this code in a member function of a class that inherit from
> Gtk::Window. So I think it's realized. But I tried to run realize()
> just before I call this function, without better results.
> 
> Has someone a small and working example to change the mouse cursor?
> 
> regards
> Andreas
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
-- 
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
                 Sergio Pascual Ram�z       spr astrax fis ucm es
               Tf: (+34)  91-394-50-18      Fax: (+34)  91-394-46-35
                     Dept. Astrof�ca Facultad de C.C. F�cas
                          Universidad Complutense de Madrid
                                 28040 Madrid (Spain)
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>




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