[Gtk-sharp-list] Notebook in Glade and Customize in Code

Fredrik Nilsson jymdman@home.se
Thu, 08 Jul 2004 21:22:02 +0200


On ons, 2004-07-07 at 18:20 -0500, Pablo Fischer wrote:
> Hi!
> 
> I've a Notebook in Glade (content_notebook). I need to add (Append)
> another page (the new one will be a Html Preview window), however, I
> can't see the new page, it's added cause NPages changes the value from 1
> to 2, but I can't see it.
> 
> I'm also trying with this:
> 
> for (int i = 0; i < 5; i ++)
> {
>  string label = String.Format ("Page {0}", i+1);
>  content_notebook.AppendPage (new Button (label), new Label (label));
>  }
> 
> Any ideas?, Thanks!
> 
> Pablo

Hi Pablo,

try this instead:

for (int i = 0; i < 5; i ++)
{
 string label = String.Format ("Page {0}", i+1);
 Button button = new Button (label);
 button.Show ();
 content_notebook.AppendPage (button, new Label (label));
}

/Fredrik