Re: gtk-demo ?



On Wed, 26 Mar 2003 23:06:12 +0100
Axel <axel azerty netcourrier com> wrote:

Geiregat Jonas wrote:

When you start gtk-demo 
on the right pane you see (I don't know the right widget name) somekind of tabs with info and source on it
I searched for the source of this demo but could only find the applications not the demo source itself.
I would like to know how I can make tabs like that in gtk+
Regards Jonas
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
 

the widget name is GtkNotebook, add it in a box or another container 
should work I think
function to add tab is gtk_append_page(GtkNotebook *,GtkWidget *,GtkLabel *)
You can find more in the api at : 
http://developer.gnome.org/doc/API/2.0/gtk/GtkNotebook.html

Hope it s the answer you was waiting for.

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



I tryed but my code doesn't work
I try to create a notebook with a textfield in it #include <gtk/gtk.h>
      2 
      3 int main(int argc,char *argv[])
      4 {
      5         gtk_init(&argc,&argv);
      6 
      7         GtkWidget *window;
      8         GtkWidget *text;
      9         GtkWidget *notebook;
     10 
     11         window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
     12         text = gtk_text_new(NULL,NULL);
     13         notebook = gtk_notebook_new();
     14         gtk_container_add(GTK_CONTAINER(window),notebook);
     15 
     16 
     17         gtk_widget_show(notebook);
     18         gtk_widget_show(window);
     19 
     20         gtk_main();
     21 
     22         return(0);
     23 }
"hw.c" 23L, 395C             
here is my code 





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