Re: Stock buttons without text?

Instead of having "Stock" buttons with icons, you can very easily just create a Gtk::Image with the StockID that you want & then add it to a Gtk::Button. As an example, this is how you would make a close button:

Gtk::Image *image = new Gtk::Image(Gtk::StockID("gtk-close"), Gtk::IconSize(1));
Gtk::Button *button = new Gtk::Button();

Hope this helps! - Andrew

Matthias Kaeppler wrote:


I try to use stock items as much as possible, but the buttons become pretty big if they have both text and icons. Are there also stock buttons which only have icons?

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