PHP-GTK
Wednesday, November 26, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkWindow::set_has_frame
GtkWindow::set_icon_from_filenext

Last updated: Sun, 12 May 2013
view this page in English

GtkWindow::set_icon

Sets icon as the icon for the window. The icon will be used when the window is minimized and may also be used in the task manager or window frame.

The image should be set in its original size. Scaling will be done automatically before the icon is shown.

If the image for the icon exists in multiple sizes, use set_icon_list() . The most appropriate size image from the list will be used in each instance where the icon is shown.

Example 160. Using a stock icon as window icon

$wnd = new GtkWindow();
$pixbuf = $wnd->render_icon(
    Gtk::STOCK_FIND,
    Gtk::ICON_SIZE_DIALOG
);
$wnd->set_icon($pixbuf);

This example uses render_icon() to create a GdkPixbuf from a GtkStockItems enum, together with a GtkIconSize size definition.

See also: get_icon() , set_icon_list()


User Contributed Notes
gtk.gtkwindow.method.set_icon.php
add a note about notes
There are no user contributed notes for this page.


previousGtkWindow::set_has_frame
GtkWindow::set_icon_from_filenext

Last updated: Sun, 12 May 2013
view this page in English


credits 

PHP  Copyright © 2001-2014 The PHP Group
 All rights reserved.
Last updated: Sun May 12 20:51:01 2013 CEST