Re: Customizing scrollbar in a ScrolledWindow



No, you are correct. You can also derive a MyCoolScrolledWindow class
from the ScrolledWindow class and substitute 2 MyCoolScrollbar instances
for the (boring) Gtk scrollbars. Then everything might/should just work.

On Wed, 2009-07-08 at 04:11 -0700, siagogam wrote:
> Hi Chuck:
> 
> I can derive the Gtk::Scrollbar class with my new class, thats not the
> problem. The problem is that internally the Gtk::ScrolledWindow instanciates
> two Gtk::ScrollBars when is created (really is the gtk_scrolled_window the
> one that creates the scrollbars), and I cant see the way of replacing those
> Gtk::ScrollBars instances with my own class (MyCoolScrollbar) instances. So
> the expose, size.. methods that will be used inside the SrolledWindow wont
> be my overloaded methods.
> 
> Please tell me if I am wrong.
> 
> thanks
> 
> 
> Chuck Crisler wrote:
> > 
> > This is simple C++. Derive a class (MyCoolScrollbar) from Gtk::Scrollbar
> > and override the methods that draw. They should be virtual. You may have
> > to override other methods for size, position, that sort of thing if your
> > geometry/sizing is different.
> > 
> > Chuck
> > 
> > On Mon, 2009-07-06 at 15:19 -0700, siagogam wrote:
> >> Hi
> >> I'm trying to build my own scrollbars customizing the way they are drawn
> >> by
> >> using cairo. The problem is that i like the way a scrolled window works
> >> and
> >> i wouldn't like to re implement this widget myself. But i cannot find the
> >> way of setting my custom MyCoolScrollbar:public Gtk::Scrollbar into the
> >> ScrolledWindow.
> >> 
> >> I was just going to modify the gtk_scrolled_window widget and the
> >> Gtk::ScrolledWindow and rebuild all GTK+ and gtkmm %-| but im sure there
> >> is
> >> an easyest way to do this.
> >> 
> >> Any suggestions?
> >> 
> >> thanks
> > 
> > _______________________________________________
> > gtkmm-list mailing list
> > gtkmm-list gnome org
> > http://mail.gnome.org/mailman/listinfo/gtkmm-list
> > 
> > 
> 



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