Re: About Gtk::Bin?



Hi Simon,

On Sat, 13 Dec 2008 15:54:13 +0100 you wrote:
> Actually, I have no idea why it does not work. Seems to be a problem
> with the Gtk::Bin. I replaced it with a Box and it worked.
> 

I've seen one change between your two posted versions that would explain it. In the working one you have:

> class Window : public Gtk::Window
> {
>   public:
>     Window()
>     {
>       add(viewer_);
>       show_all();
>     }
> };

Whereas the original had:

> >>> class Window:public Gtk::Window
> >>> {
> >>> public:
> >>>     Window(){
> >>>         add(viewer_);
> >>>         viewer_.show();
> >>>     }
> >>> };

Comparing these extracts you'll note that the original only showed the viewer, and not the window itself, while the new version shows "all", meaning the window and all its children.


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