Re: Tabs with icon

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

 



Hello.
To achieve this, simply pack GtkLabel and GtkButton into GtkHBox, thenset that GtkHBox as the tab widget for your notebook page.
Sample code:---- CODE ----hbox = gtk_hbox_new( FALSE, 6 );gtk_box_pack_start( GTK_BOX( hbox ), gtk_label_new( "Tab1" ), TRUE, TRUE, 0 );gtk_box_pack_start( GTK_BOX( hbox ),                    gtk_button_new_from_stock( GTK_STOCK_CLOSE ),FALSE, FALSE, 0 );gtk_widget_show_all( vbox );gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), child, hbox );---- CODE ----
You'll probably want to tweak the buttons appearance a bit and connectsome signals to it, but other than that, the code should work asexpected.

2009/5/1 as2 <agent59624285@xxxxxxxxxxxxxxxxxx>:>> How can I get icons in tabs with GtkNotebook? Similar to how Firefox does it.> There doesn't seem to be a way to use GtkNotebook directly to achieve this.> --> View this message in context: http://www.nabble.com/Tabs-with-icon-tp23338799p23338799.html> Sent from the Gtk+ - General mailing list archive at Nabble.com.>> _______________________________________________> gtk-list mailing list> gtk-list@xxxxxxxxx> http://mail.gnome.org/mailman/listinfo/gtk-list>


-- Tadej Borovšaktadeboro.blogspot.comtadeboro@xxxxxxxxxxxxxxxxxxxxxxx@gmail.com_______________________________________________gtk-list mailing listgtk-list@xxxxxxxxxxxxx://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux