Re: [gtkmm] Widget* get_nth_page (int page_number) doesn't work here



> 
> or maybe a little more correct?
> 
> Gtk::Button *b = static_cast<Gtk::Button*>(days->get_nth_page(0));
> 
> Don't know if static_cast is the appropriate *_cast to use...
> 

Since you're casting from a base class (Gtk::Widget) to a child
class (Gtk::Button), you should use dynamic_cast<>.  This has
the benefit of returning 0 if the cast fails.

cheers,
-- 
If video games really affected kids, we'd all be running around in dark
rooms, munching on pills, and listening to electronic music.





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