Re: Customizing scrollbar in a ScrolledWindow



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
> 
> 

-- 
View this message in context: http://www.nabble.com/Customizing-scrollbar-in-a-ScrolledWindow-tp24360834p24389535.html
Sent from the Gtkmm mailing list archive at Nabble.com.



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