<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>le blog de Poseidon627</title><link>http://poseidon627.canalblog.com/</link><description>Blog sur l&apos;informatique</description><language>fr</language><lastBuildDate>Thu, 12 Nov 2009 18:55:45 GMT</lastBuildDate><generator>CanalBlog - http://www.canalblog.com</generator><item><title>Solution LAMP sans XAMPP</title><dc:creator>Poseidon627</dc:creator><link>http://poseidon627.canalblog.com/archives/2009/10/13/15421836.html</link><category>apache</category><category>lamp</category><category>mysql</category><category>php</category><category>xampp</category><comments>http://poseidon627.canalblog.com/archives/2009/10/13/15421836.html#comments</comments><wfw:commentRss>http://poseidon627.canalblog.com/feeds/rss/comments/post/15421836/</wfw:commentRss><guid isPermaLink="true">http://poseidon627.canalblog.com/archives/2009/10/13/15421836.html</guid><description>&lt;p&gt;XAMPP ne fonctionnant que sur des architectures 32 bits, j&apos;ai eu la mauvaise surprise d&apos;apprendre, &#xe0; mes d&#xe9;pends, que je ne pouvais pas l&apos;installer sur ma toute nouvelle Fedora 11 fra&#xee;chement install&#xe9;e.&lt;/p&gt;
&lt;p&gt;J&apos;ai donc d&#xe9;cid&#xe9; d&apos;installer le tout &#xe0; la mano&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#66cc00&quot;&gt;&lt;strong&gt;&lt;font size=&quot;3&quot;&gt;&lt;u&gt;1&#xe8;re &#xe9;tape &lt;/u&gt;:&lt;/font&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#3333ff&quot;&gt;Installation de PHP&lt;/font&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; # &lt;font color=&quot;#ff6633&quot;&gt;&lt;strong&gt;su -lc &apos;yum install php-cli&apos;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#3333ff&quot;&gt;V&#xe9;rification du fonctionnement&lt;/font&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; # &lt;font color=&quot;#ff6633&quot;&gt;&lt;strong&gt;php --version&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#3333ff&quot;&gt;Installation de l&apos;extension pour Apache&lt;/font&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; # &lt;strong&gt;&lt;font color=&quot;#ff6633&quot;&gt;su -lc &apos;yum install php&apos;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#3333ff&quot;&gt;Activer le service&lt;/font&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; # &lt;font color=&quot;#ff6633&quot;&gt;&lt;strong&gt;su -lc &apos;service httpd start&apos;&lt;font color=&quot;#333333&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size=&quot;3&quot; color=&quot;#66cc00&quot;&gt;&lt;strong&gt;&lt;u&gt;2nde &#xe9;tape &lt;/u&gt;:&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#3333ff&quot;&gt;Installation de phpMyAdmin&lt;/font&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; # &lt;font color=&quot;#ff6633&quot;&gt;&lt;strong&gt;su -c &apos;yum install phpMyAdmin&apos;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;- L&apos;application s&apos;installera en respectant les chemins suivants :&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; * &lt;font color=&quot;#3333ff&quot;&gt;fichier de config de l&apos;alias apache pour phpMyAdmin&lt;/font&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; # &lt;font color=&quot;#ff6600&quot;&gt;&lt;strong&gt;/etc/httpd/conf.d/phpMyAdmin.conf&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; *&lt;font color=&quot;#3333ff&quot;&gt; fichiers PHP de l&apos;application&lt;/font&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; #&lt;font color=&quot;#ff6633&quot;&gt;&lt;strong&gt; /usr/share/phpMyAdmin&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;- Relancer le service&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; # &lt;font color=&quot;#ff6633&quot;&gt;&lt;strong&gt;su -lc &apos;service httpd reload&apos;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#66cc00&quot;&gt;&lt;strong&gt;&lt;font size=&quot;3&quot;&gt;&lt;u&gt;3&#xe8;me &#xe9;tape &lt;/u&gt;:&lt;/font&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#3333ff&quot;&gt;Installer mysql-server&lt;/font&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; # &lt;font color=&quot;#ff6633&quot;&gt;&lt;strong&gt;su -lc &apos;yum install mysql-server&apos;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#3333ff&quot;&gt;Relancer le service httpd&lt;br /&gt;Relancer le service mysqld&lt;/font&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; # &lt;font color=&quot;#ff6633&quot;&gt;&lt;strong&gt;su -lc &apos;service mysqld start&apos;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#3333ff&quot;&gt;Changer le mot de passe root&lt;/font&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; # &lt;font color=&quot;#ff6633&quot;&gt;&lt;strong&gt;mysqladmin -u root password mon_motDePasse&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#999999&quot;&gt;Le r&#xe9;pertoire root se trouve dans /var/www/html&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#ff6633&quot;&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;</description><pubDate>Tue, 13 Oct 2009 16:15:00 GMT</pubDate></item><item><title>Lille nouvelle fois capitale europ&#xe9;enne de la culture</title><dc:creator>Poseidon627</dc:creator><link>http://poseidon627.canalblog.com/archives/2009/01/31/12304047.html</link><category>Divers</category><comments>http://poseidon627.canalblog.com/archives/2009/01/31/12304047.html#comments</comments><wfw:commentRss>http://poseidon627.canalblog.com/feeds/rss/comments/post/12304047/</wfw:commentRss><guid isPermaLink="true">http://poseidon627.canalblog.com/archives/2009/01/31/12304047.html</guid><description>&lt;p&gt;Et oui, apparemment Lille remet &#xe7;&#xe0; avec Lille 3000 - Europe XXL&lt;br /&gt;De mars &#xe0; octobre 2009, 500 manifestations seront &#xe0; d&#xe9;couvrir&lt;/p&gt;
&lt;p&gt;Voici l&apos;adresse du site : &lt;a href=&quot;http://www.lille3000.com/&quot;&gt;http://www.lille3000.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A bient&#xf4;t chez les ch&apos;ti&lt;/p&gt;</description><pubDate>Sat, 31 Jan 2009 18:00:00 GMT</pubDate></item><item><title>Bonne ann&#xe9;e 2009</title><dc:creator>Poseidon627</dc:creator><link>http://poseidon627.canalblog.com/archives/2009/01/04/11956079.html</link><category>Divers</category><comments>http://poseidon627.canalblog.com/archives/2009/01/04/11956079.html#comments</comments><wfw:commentRss>http://poseidon627.canalblog.com/feeds/rss/comments/post/11956079/</wfw:commentRss><guid isPermaLink="true">http://poseidon627.canalblog.com/archives/2009/01/04/11956079.html</guid><description>&lt;meta http-equiv=&quot;CONTENT-TYPE&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name=&quot;GENERATOR&quot; content=&quot;OpenOffice.org 3.0 (Linux)&quot; /&gt;
&lt;style type=&quot;text/css&quot;&gt;
&amp;amp;amp;amp;lt;!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
--&amp;amp;amp;amp;gt;&lt;/style&gt;&lt;style type=&quot;text/css&quot;&gt;&amp;amp;amp;amp;lt;!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
--&amp;amp;amp;amp;gt;&lt;/style&gt;&lt;p&gt;French&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; - Bonne ann&#xe9;e&lt;br /&gt;English&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; - Happy new year&lt;br /&gt;German&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;- Ein gutes neues Jahr&lt;br /&gt;Arabian&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; - aam saiid&lt;br /&gt;Chinese&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;- 新年快乐&lt;br /&gt;Japanese&amp;nbsp; &amp;nbsp; - あけましておめでとう&lt;br /&gt;Dutch&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;- Gelukkig Nieuwjaar&lt;br /&gt;Nowegian&amp;nbsp; &amp;nbsp;-	Godt nytt&lt;font face=&quot;Liberation Serif, serif&quot;&gt;&#xe5;&lt;/font&gt;r&lt;br /&gt;Swedish&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;- Gott nytt &lt;font face=&quot;Liberation Serif, serif&quot;&gt;&#xe5;&lt;/font&gt;r&lt;br /&gt;Finnish&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; - Onnellista uutta vuotta&lt;/p&gt;
</description><pubDate>Sat, 03 Jan 2009 23:05:00 GMT</pubDate></item><item><title>PCL PowerChampion&apos;s League</title><dc:creator>Poseidon627</dc:creator><link>http://poseidon627.canalblog.com/archives/2008/12/10/11693645.html</link><category>Divers</category><category>fauteuil roulant</category><category>handicap&#xe9;</category><category>powerchampion</category><category>sport</category><comments>http://poseidon627.canalblog.com/archives/2008/12/10/11693645.html#comments</comments><wfw:commentRss>http://poseidon627.canalblog.com/feeds/rss/comments/post/11693645/</wfw:commentRss><guid isPermaLink="true">http://poseidon627.canalblog.com/archives/2008/12/10/11693645.html</guid><description>&lt;p&gt;Je publie ce fil pour promouvoir une cat&#xe9;gorie sportive encore mal connue pour le moment. Je trouve que les participants m&#xe9;ritent bien qu&apos;on leur consacre une place sur ce modeste blog. N&apos;h&#xe9;sitez pas &#xe0; visionner les photos.&lt;/p&gt;
&lt;p&gt;Le lien se trouve dans les liens d&apos;amis, dans la cat&#xe9;gorie &amp;quot;sports&amp;quot;.&lt;/p&gt;</description><pubDate>Wed, 10 Dec 2008 10:05:00 GMT</pubDate></item><item><title>PyGTK : Windows : Give a title in the window</title><dc:creator>Poseidon627</dc:creator><link>http://poseidon627.canalblog.com/archives/2008/04/23/8923650.html</link><category>English</category><comments>http://poseidon627.canalblog.com/archives/2008/04/23/8923650.html#comments</comments><wfw:commentRss>http://poseidon627.canalblog.com/feeds/rss/comments/post/8923650/</wfw:commentRss><guid isPermaLink="true">http://poseidon627.canalblog.com/archives/2008/04/23/8923650.html</guid><description>&lt;p&gt;Our first window was born.&lt;br /&gt;Now, we can give it a name.&lt;br /&gt;In order to do that, a method exists :&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;font color=&quot;#666666&quot;&gt;set_title(name_of_my_window)&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;But let us see in practice what it gives :&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Code&lt;/u&gt; :&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#ff6600&quot;&gt;#!/usr/bin/env python&lt;br /&gt;# -*- Encoding: Latin-1 -*-&lt;br /&gt;&lt;br /&gt;import pygtk&lt;br /&gt;pygtk.require(&apos;2.0&apos;)&lt;br /&gt;import gtk&lt;br /&gt;&lt;br /&gt;def fenetre():&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre = gtk.Window(gtk.WINDOW_TOPLEVEL)&lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre.set_default_size(400, 200)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;strong&gt;&lt;font color=&quot;#ff3333&quot;&gt;fenetre.set_title(&amp;quot;Ma premiere fenetre&amp;quot;)&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre.show_all()&lt;br /&gt;&amp;nbsp; &amp;nbsp; gtk.main()&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;if __name__ == &apos;__main__&apos;:&lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre()&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;R&#xe9;sultat &lt;/u&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://storage.canalblog.com/31/69/287253/24221733.png&quot;&gt;&lt;img width=&quot;300&quot; height=&quot;50&quot; border=&quot;0&quot; src=&quot;http://storage.canalblog.com/31/69/287253/24221733_p.png&quot; alt=&quot;fen_titre&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Wed, 23 Apr 2008 08:57:49 GMT</pubDate></item><item><title>PyGTK : Windows : Creation of a basic window</title><dc:creator>Poseidon627</dc:creator><link>http://poseidon627.canalblog.com/archives/2008/04/23/8923322.html</link><category>English</category><comments>http://poseidon627.canalblog.com/archives/2008/04/23/8923322.html#comments</comments><wfw:commentRss>http://poseidon627.canalblog.com/feeds/rss/comments/post/8923322/</wfw:commentRss><guid isPermaLink="true">http://poseidon627.canalblog.com/archives/2008/04/23/8923322.html</guid><description>&lt;p&gt;The class used to create windows is :&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#0033ff&quot;&gt;&lt;strong&gt;&amp;nbsp; &amp;nbsp; gtk.Window(windows_type)&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Attirbute windows_type can take two values :&amp;nbsp; &amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;font color=&quot;#666666&quot;&gt;gtk.WINDOW_TOPLEVEL&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;font color=&quot;#999999&quot;&gt;&lt;em&gt;Create a complete window composed of the active party, the bar of title, of the borders&lt;/em&gt;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#666666&quot;&gt;&lt;strong&gt;&lt;br /&gt;gtk.WINDOW_POPUP&lt;/strong&gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;font color=&quot;#999999&quot;&gt;&lt;em&gt;In the opposite, this parameter means that alone active part will be visible&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;&lt;br /&gt;Code &lt;/u&gt;:&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#ff6600&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; #!/usr/bin/env python&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; # -*- Encoding: Latin-1 -*-&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; import pygtk&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; pygtk.require(&apos;2.0&apos;)&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; import gtk&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; def fenetre():&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;fenetre = gtk.Window(gtk.WINDOW_TOPLEVEL)&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;fenetre.set_default_size(400, 200)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;fenetre.show_all()&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;gtk.main()&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; if __name__ == &apos;__main__&apos;:&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;fenetre()&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Result &lt;/u&gt;:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://storage.canalblog.com/01/46/287253/24191580.png&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;84&quot; border=&quot;0&quot; alt=&quot;new_window&quot; src=&quot;http://storage.canalblog.com/01/46/287253/24191580_p.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;&lt;br /&gt;Quelques explications&lt;/u&gt; :&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#ff6600&quot;&gt;&lt;font color=&quot;#9933ff&quot;&gt;&lt;strong&gt;fenetre = gtk.Window(gtk.WINDOW_TOPLEVEL)&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;font color=&quot;#999999&quot;&gt;&lt;em&gt;This line allows to call the class gtk.Window()&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#ff6600&quot;&gt;&lt;font color=&quot;#9933ff&quot;&gt;&lt;strong&gt;fenetre.set_default_size(400, 200)&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;font color=&quot;#999999&quot;&gt;&lt;em&gt;Here, method set_default_size (width, height) allows to give a width and a height (in pixels) in the window&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#9933ff&quot;&gt;&lt;strong&gt;fenetre.show_all()&lt;/strong&gt;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#999999&quot;&gt;&lt;em&gt;&amp;nbsp; &amp;nbsp; Method show_all() allows to show the widget (here, the window) and all widgets children&lt;br /&gt;&amp;nbsp; &amp;nbsp; In order to do that, it is necessary that the parent is a container&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;</description><pubDate>Wed, 23 Apr 2008 08:29:00 GMT</pubDate></item><item><title>PyGTK : Les boutons : Bouton poussoir</title><dc:creator>Poseidon627</dc:creator><link>http://poseidon627.canalblog.com/archives/2008/04/20/8890892.html</link><category>PyGTK</category><comments>http://poseidon627.canalblog.com/archives/2008/04/20/8890892.html#comments</comments><wfw:commentRss>http://poseidon627.canalblog.com/feeds/rss/comments/post/8890892/</wfw:commentRss><guid isPermaLink="true">http://poseidon627.canalblog.com/archives/2008/04/20/8890892.html</guid><description>&lt;p&gt;Voyons maintenant le cas d&apos;un autre bouton : &lt;font color=&quot;#00cc00&quot;&gt;&lt;strong&gt;le bouton poussoir&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;La classe utilis&#xe9;e est la classe&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#0033ff&quot;&gt;&lt;strong&gt;gtk.ToggleButton(label=None, use_underline=True)&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Cette classe accepte 2 param&#xe8;tres qui ont d&#xe9;j&#xe0; &#xe9;t&#xe9; trait&#xe9;s dans les posts pr&#xe9;c&#xe9;dents.&lt;br /&gt;Par d&#xe9;faut, &lt;em&gt;label=None&lt;/em&gt; et &lt;em&gt;use_underline=True&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Ce type de bouton peut prendre 3 &#xe9;tats &lt;/u&gt;:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; a/ rel&#xe2;ch&#xe9;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;strong&gt;set_active(False)&lt;/strong&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; b/ enfonc&#xe9;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;strong&gt;set_active(True)&lt;/strong&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; c/ pour ce 3&#xe8;me &#xe9;tat, je vais illustrer en utilisant mon logiciel de traitement de texte pr&#xe9;f&#xe9;r&#xe9;, dans lequel je cr&#xe9;e 2 lignes de texte; 1 avec alignement gauche et une avec alignement centr&#xe9;.&lt;br /&gt;Dans le cas de l&apos;alignement gauche, si je s&#xe9;lectionne le texte, on voit que le bouton passe en mode enfonc&#xe9;&amp;nbsp; &amp;nbsp;&lt;br /&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://storage.canalblog.com/14/96/287253/24633421.png&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;300&quot; height=&quot;52&quot; border=&quot;0&quot; alt=&quot;gauche_active&quot; src=&quot;http://storage.canalblog.com/14/96/287253/24633421_p.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Dans le cas de l&apos;alignement centr&#xe9;, m&#xea;me chose, mais avec le bouton &amp;quot;alignement centr&#xe9;&amp;quot;&amp;nbsp; &amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://storage.canalblog.com/10/21/287253/24633374.png&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;300&quot; height=&quot;53&quot; border=&quot;0&quot; alt=&quot;centre_active&quot; src=&quot;http://storage.canalblog.com/10/21/287253/24633374_p.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Maintenant, si je s&#xe9;lectionne les deux lignes, les deux boutons repassent en mode rel&#xe2;ch&#xe9;&amp;nbsp; &amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://storage.canalblog.com/55/93/287253/24633559.png&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;300&quot; height=&quot;53&quot; border=&quot;0&quot; alt=&quot;relache&quot; src=&quot;http://storage.canalblog.com/55/93/287253/24633559_p.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;C&apos;est donc ce qu&apos;illustre ce troisi&#xe8;me &#xe9;tat, pour lequel on utilise la m&#xe9;thode &lt;strong&gt;set_inconsistent(True)&lt;/strong&gt;, qui permet de donner au bouton, l&apos;aspect inactif.&lt;/p&gt;
&lt;p&gt;Mais voyons plut&#xf4;t un exemple&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Code &lt;/u&gt;:&lt;br /&gt;&lt;font color=&quot;#ff6600&quot;&gt;&lt;br /&gt;#!/usr/bin/env python&lt;br /&gt;# -*- Encoding: Latin-1 -*-&lt;br /&gt;&lt;br /&gt;import pygtk&lt;br /&gt;pygtk.require(&apos;2.0&apos;)&lt;br /&gt;import gtk&lt;br /&gt;&lt;br /&gt;def fenetre():&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre = gtk.Window(gtk.WINDOW_TOPLEVEL)&lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre.set_default_size(400, 200)&lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre.set_title(u&amp;quot;Ma premiere fen&#xea;tre&amp;quot;)&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; verti2 = gtk.VBox(homogeneous=False)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; tb = gtk.ToggleButton(label = &amp;quot;b1&amp;quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; tb.&lt;strong&gt;set_active(True)&lt;/strong&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; tb2 = gtk.ToggleButton(label = &amp;quot;b2&amp;quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; tb2.&lt;strong&gt;set_active(False)&lt;/strong&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; tb3 = gtk.ToggleButton(label = &amp;quot;b3&amp;quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; tb3.&lt;strong&gt;set_inconsistent(True)&lt;/strong&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; verti2.pack_start(tb, False)&lt;br /&gt;&amp;nbsp; &amp;nbsp; verti2.pack_start(tb2, False)&lt;br /&gt;&amp;nbsp; &amp;nbsp; verti2.pack_start(tb3, False)&lt;br /&gt;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre.add(verti2)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre.show_all()&lt;br /&gt;&amp;nbsp; &amp;nbsp; gtk.main()&lt;br /&gt;&lt;br /&gt;if __name__ == &apos;__main__&apos;:&lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre()&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;R&#xe9;sultat &lt;/u&gt;:&lt;/p&gt;
&lt;p&gt;1/ b1 enfonc&#xe9;, b2 rel&#xe2;ch&#xe9; et b3 inactif (dont l&apos;&#xe9;tat ne peut changer en cliquant sur le bouton)&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://storage.canalblog.com/04/28/287253/24633981.png&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;83&quot; border=&quot;0&quot; alt=&quot;b1_enfonce&quot; src=&quot;http://storage.canalblog.com/04/28/287253/24633981_p.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2/ b1 rel&#xe2;ch&#xe9;, b2 enfonc&#xe9; et b3 inactif&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://storage.canalblog.com/05/45/287253/24634024.png&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;83&quot; border=&quot;0&quot; alt=&quot;b2_enfonce&quot; src=&quot;http://storage.canalblog.com/05/45/287253/24634024_p.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3/ b1 et b2 enfonc&#xe9; et b3 toujours inactif&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://storage.canalblog.com/80/97/287253/24634064.png&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;83&quot; border=&quot;0&quot; alt=&quot;2btn_enfonces&quot; src=&quot;http://storage.canalblog.com/80/97/287253/24634064_p.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sun, 20 Apr 2008 17:45:00 GMT</pubDate></item><item><title>PyGTK : Manuel de r&#xe9;f&#xe9;rence</title><dc:creator>Poseidon627</dc:creator><link>http://poseidon627.canalblog.com/archives/2008/04/14/8807294.html</link><category>PyGTK</category><comments>http://poseidon627.canalblog.com/archives/2008/04/14/8807294.html#comments</comments><wfw:commentRss>http://poseidon627.canalblog.com/feeds/rss/comments/post/8807294/</wfw:commentRss><guid isPermaLink="true">http://poseidon627.canalblog.com/archives/2008/04/14/8807294.html</guid><description>&lt;p&gt;Afin d&apos;avoir un aper&#xe7;u de toutes les classes et m&#xe9;thodes de PyGTK, voici un lien renvoyant au&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.pygtk.org/docs/pygtk/index.html&quot;&gt;Manuel de r&#xe9;f&#xe9;rence PyGTK 2.0&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sun, 13 Apr 2008 22:26:24 GMT</pubDate></item><item><title>PyGTK : Les boites</title><dc:creator>Poseidon627</dc:creator><link>http://poseidon627.canalblog.com/archives/2008/04/13/8806896.html</link><category>PyGTK</category><comments>http://poseidon627.canalblog.com/archives/2008/04/13/8806896.html#comments</comments><wfw:commentRss>http://poseidon627.canalblog.com/feeds/rss/comments/post/8806896/</wfw:commentRss><guid isPermaLink="true">http://poseidon627.canalblog.com/archives/2008/04/13/8806896.html</guid><description>&lt;p&gt;Afin de pouvoir placer plusieurs widgets dans un conteneur, il faut utiliser les m&#xe9;thodes :&lt;br /&gt;&lt;font color=&quot;#0033ff&quot;&gt;&lt;br /&gt;&lt;strong&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; gtk.HBox(homogeneous, spacing)&lt;/strong&gt;&lt;br /&gt;&lt;em&gt;&lt;font color=&quot;#3399ff&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; Cr&#xe9;e une boite o&#xf9; les widgets seront plac&#xe9;s horizontalement&lt;/font&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; gtk.VBox(homogeneous, spacing)&lt;/strong&gt;&lt;br /&gt;&lt;font color=&quot;#3399ff&quot;&gt;&lt;em&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; Cr&#xe9;e une boite o&#xf9; les widgets seront plac&#xe9;s verticalement&lt;/em&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Les param&#xe8;tres &lt;/u&gt;:&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#9966ff&quot;&gt;&lt;strong&gt;homogeneous&lt;/strong&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; Si cette valeur est &#xe0; True, tous les widgets occuperont un espace &#xe9;quivalent&lt;br /&gt;&lt;strong&gt;spacing &lt;/strong&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;Permet de d&#xe9;finir l&apos;espacement entre chacun des widgets&lt;br /&gt;Par d&#xe9;faut, ces param&#xe8;tres sont &#xe0; homogeneous=False et spacing=0&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Comment ajouter des widgets dans la boite ?&lt;br /&gt;Nous avons besoin ici, des deux m&#xe9;thodes suivantes :&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#0033ff&quot;&gt;&lt;strong&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; box.pack_start(child, expand, fill, padding)&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;font color=&quot;#3399ff&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; ajoute les widgets de gauche &#xe0; droite (HBox) ou de haut en bas (VBox)&lt;br /&gt;&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; box.pack_end(child, expand, fill, padding)&lt;br /&gt;&lt;strong&gt;&lt;font color=&quot;#3399ff&quot;&gt;&lt;em&gt;&lt;strong&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; ajoute les widgets de droite &#xe0; gauche ou de bas en haut&lt;/strong&gt;&lt;/em&gt;&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Les param&#xe8;tres &lt;/u&gt;:&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#9966ff&quot;&gt;&lt;strong&gt;child&lt;/strong&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; Widget ajout&#xe9; &#xe0; la boite&lt;br /&gt;&lt;strong&gt;expand &lt;/strong&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; Ce param&#xe8;tre ne peut &#xea;tre actif que lorsque Homogeneous=False.&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;Un widget dont expand=False occupera seulement l&apos;espace n&#xe9;cessaire&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;A l&apos;inverse, des widgets dont expand=True occuperont des espaces &#xe9;quivalents&lt;br /&gt;&lt;strong&gt;fill &lt;/strong&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; Indique si le widget occupera tout l&apos;espace qui lui est r&#xe9;serv&#xe9;&lt;br /&gt;&lt;strong&gt;padding&lt;/strong&gt;&amp;nbsp; &amp;nbsp; Pour ajouter de l&apos;espace autour du widget&lt;br /&gt;&lt;em&gt;Les param&#xe8;tres par d&#xe9;faut sont expand=True, fill=True, padding=0&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Code g&#xe9;n&#xe9;ral &lt;/u&gt;:&lt;br /&gt;&lt;font color=&quot;#ff6600&quot;&gt;&lt;br /&gt;#!/usr/bin/env python&lt;br /&gt;# -*- Encoding: Latin-1 -*-&lt;br /&gt;&lt;br /&gt;import pygtk&lt;br /&gt;pygtk.require(&apos;2.0&apos;)&lt;br /&gt;import gtk&lt;br /&gt;&lt;br /&gt;def fenetre():&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre = gtk.Window(gtk.WINDOW_TOPLEVEL)&lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre.set_default_size(400, 200)&lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre.set_title(&amp;quot;Ma premiere fenetre&amp;quot;)&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; ..........&lt;br /&gt;&lt;font color=&quot;#666666&quot;&gt;&lt;strong&gt;&amp;nbsp; &amp;nbsp; &amp;quot;&amp;quot;&amp;quot;Code &#xe0; ajouter&amp;quot;&amp;quot;&amp;quot;&lt;/strong&gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; ..........&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre.show_all()&lt;br /&gt;&amp;nbsp; &amp;nbsp; gtk.main()&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;if __name__ == &apos;__main__&apos;:&lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre()&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Boite avec homogeneous=True &lt;/u&gt;:&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#ff6600&quot;&gt;&amp;nbsp; &amp;nbsp; ..........&lt;br /&gt;&amp;nbsp; &amp;nbsp; verti2 = gtk.HBox(homogeneous=True)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; bouton1 = gtk.Button(&amp;quot;Btn 1&amp;quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; bouton2 = gtk.Button(&amp;quot;Btn 2&amp;quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; verti2.pack_start(bouton1)&lt;br /&gt;&amp;nbsp; &amp;nbsp; verti2.pack_start(bouton2)&lt;br /&gt;&amp;nbsp; &amp;nbsp; ..........&lt;/font&gt;&lt;br /&gt;&lt;u&gt;&lt;br /&gt;R&#xe9;sultat &lt;/u&gt;:&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#00cc00&quot;&gt;gtk.HBox&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; gtk.VBox&lt;/font&gt;&lt;br /&gt;&lt;a href=&quot;http://storage.canalblog.com/21/04/287253/24376976.png&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;83&quot; border=&quot;0&quot; alt=&quot;bte_H001&quot; src=&quot;http://storage.canalblog.com/21/04/287253/24376976_p.png&quot; /&gt;&lt;/a&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://storage.canalblog.com/03/88/287253/24376994.png&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;83&quot; border=&quot;0&quot; alt=&quot;bte_V001&quot; src=&quot;http://storage.canalblog.com/03/88/287253/24376994_p.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;On observe bien ici que les widgets occupent un espace &#xe9;quivalent&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Boite avec homogeneous=False et expand=True &lt;/u&gt;:&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#ff6600&quot;&gt;
&amp;nbsp; &amp;nbsp; ..........&lt;br /&gt;
&amp;nbsp; &amp;nbsp; verti2 = gtk.HBox(homogeneous=False)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; bouton1 = gtk.Button(&amp;quot;Btn 1&amp;quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; bouton2 = gtk.Button(&amp;quot;Btn 2&amp;quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; verti2.pack_start(bouton1, True)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; verti2.pack_start(bouton2, True)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ..........&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;
R&#xe9;sultat &lt;/u&gt;:&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#00cc00&quot;&gt;gtk.HBox&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; gtk.VBox&lt;/font&gt;&lt;br /&gt;
&lt;a href=&quot;http://storage.canalblog.com/21/04/287253/24376976.png&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;83&quot; border=&quot;0&quot; alt=&quot;bte_H001&quot; src=&quot;http://storage.canalblog.com/21/04/287253/24376976_p.png&quot; /&gt;&lt;/a&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://storage.canalblog.com/03/88/287253/24376994.png&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;83&quot; border=&quot;0&quot; alt=&quot;bte_V001&quot; src=&quot;http://storage.canalblog.com/03/88/287253/24376994_p.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
On observe ici le m&#xea;me r&#xe9;sultat qu&apos;avec homogeneous=True&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Boite avec homogeneous=False et expand alternant True et False &lt;/u&gt;:&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#ff6600&quot;&gt;
&amp;nbsp; &amp;nbsp; ..........&lt;br /&gt;&amp;nbsp; &amp;nbsp; verti2 = gtk.VBox(homogeneous=False)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; bouton1 = gtk.Button(&amp;quot;Btn 1&amp;quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; bouton2 = gtk.Button(&amp;quot;Btn 2&amp;quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; bouton3 = gtk.Button(&amp;quot;Btn 3&amp;quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; bouton4 = gtk.Button(&amp;quot;Btn 4&amp;quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; verti2.pack_start(bouton1, False)&lt;br /&gt;&amp;nbsp; &amp;nbsp; verti2.pack_start(bouton2, True)&lt;br /&gt;&amp;nbsp; &amp;nbsp; verti2.pack_start(bouton3, False)&lt;br /&gt;&amp;nbsp; &amp;nbsp; verti2.pack_start(bouton4, True)&lt;br /&gt;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre.add(verti2)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ..........&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;
R&#xe9;sultat &lt;/u&gt;:&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#00cc00&quot;&gt;gtk.HBox&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; gtk.VBox&lt;/font&gt;&lt;br /&gt;&lt;a href=&quot;http://storage.canalblog.com/77/81/287253/24377295.png&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;83&quot; border=&quot;0&quot; alt=&quot;bte_H002&quot; src=&quot;http://storage.canalblog.com/77/81/287253/24377295_p.png&quot; /&gt;&lt;/a&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://storage.canalblog.com/43/82/287253/24377311.png&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;83&quot; border=&quot;0&quot; alt=&quot;bte_V002&quot; src=&quot;http://storage.canalblog.com/43/82/287253/24377311_p.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;En mettant le param&#xe8;tre fill=True sur le bouton 2, voici ce que cela donne &lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://storage.canalblog.com/07/37/287253/24377885.png&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;83&quot; border=&quot;0&quot; src=&quot;http://storage.canalblog.com/07/37/287253/24377885_p.png&quot; alt=&quot;bte_H003&quot; /&gt;&lt;/a&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;a target=&quot;_blank&quot; href=&quot;http://storage.canalblog.com/51/31/287253/24377892.png&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;83&quot; border=&quot;0&quot; src=&quot;http://storage.canalblog.com/51/31/287253/24377892_p.png&quot; alt=&quot;bte_V003&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;On peut observer que le bouton deux n&apos;occupe pas tout l&apos;espace qui lui a &#xe9;t&#xe9; r&#xe9;serv&#xe9;&lt;/p&gt;
&lt;p&gt;En mettant maintenant, un padding=15 sur le bouton 4, voici ce que l&apos;on obtient&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://storage.canalblog.com/07/37/287253/24377885.png&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://storage.canalblog.com/35/43/287253/24378183.png&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://storage.canalblog.com/52/75/287253/24378198.png&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://storage.canalblog.com/24/56/287253/24378217.png&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;83&quot; border=&quot;0&quot; src=&quot;http://storage.canalblog.com/24/56/287253/24378217_p.png&quot; alt=&quot;bte_H004&quot; /&gt;&lt;/a&gt;&lt;/a&gt;&lt;/a&gt;&lt;/a&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;a target=&quot;_blank&quot; href=&quot;http://storage.canalblog.com/38/78/287253/24378166.png&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://storage.canalblog.com/59/06/287253/24378186.png&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;83&quot; border=&quot;0&quot; src=&quot;http://storage.canalblog.com/59/06/287253/24378186_p.png&quot; alt=&quot;bte_V004&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;Enfin, utilisons pack_end(...)&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Code &lt;/u&gt;:&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#ff6600&quot;&gt;&amp;nbsp; &amp;nbsp; verti2 = gtk.VBox(homogeneous=False)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; bouton1 = gtk.Button(&amp;quot;Btn 1&amp;quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; bouton2 = gtk.Button(&amp;quot;Btn 2&amp;quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; bouton3 = gtk.Button(&amp;quot;Btn 3&amp;quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; bouton4 = gtk.Button(&amp;quot;Btn 4&amp;quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; verti2.pack_end(bouton1, False)&lt;br /&gt;&amp;nbsp; &amp;nbsp; verti2.pack_end(bouton2, True, False)&lt;br /&gt;&amp;nbsp; &amp;nbsp; verti2.pack_end(bouton3, False)&lt;br /&gt;&amp;nbsp; &amp;nbsp; verti2.pack_end(bouton4, True, True, 15)&lt;br /&gt;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre.add(verti2)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;R&#xe9;sultat &lt;/u&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://storage.canalblog.com/84/12/287253/24378326.png&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;83&quot; border=&quot;0&quot; src=&quot;http://storage.canalblog.com/84/12/287253/24378326_p.png&quot; alt=&quot;bte_H005&quot; /&gt;&lt;/a&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;a target=&quot;_blank&quot; href=&quot;http://storage.canalblog.com/10/28/287253/24378332.png&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;83&quot; border=&quot;0&quot; src=&quot;http://storage.canalblog.com/10/28/287253/24378332_p.png&quot; alt=&quot;bte_V005&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;On peut observer que les boutons sont bien plac&#xe9;s de droite &#xe0; gauche et de bas en haut&lt;/p&gt;</description><pubDate>Sun, 13 Apr 2008 21:36:00 GMT</pubDate></item><item><title>PyGTK : Buttons : My first button</title><dc:creator>Poseidon627</dc:creator><link>http://poseidon627.canalblog.com/archives/2008/04/12/8791653.html</link><category>English</category><comments>http://poseidon627.canalblog.com/archives/2008/04/12/8791653.html#comments</comments><wfw:commentRss>http://poseidon627.canalblog.com/feeds/rss/comments/post/8791653/</wfw:commentRss><guid isPermaLink="true">http://poseidon627.canalblog.com/archives/2008/04/12/8791653.html</guid><description>&lt;p&gt;&lt;font color=&quot;#ff3300&quot;&gt;&lt;u&gt;&lt;strong&gt;Dear not French-speaking foreign friends&lt;/strong&gt;&lt;/u&gt;&lt;br /&gt;&lt;em&gt;Do not hesitate to point out to me errors of translation&lt;br /&gt;help me to correct my errors to bring some change in my English&lt;br /&gt;if you wish that I translate other articles, having made it me know by leaving a comment&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;We are going to deal, of a widget essential new in the creation of graphic interfaces here : &lt;font color=&quot;#009900&quot;&gt;&lt;strong&gt;Buttons&lt;/strong&gt;&lt;/font&gt;&lt;br /&gt;A simple click on these buttons is going to allow to perform actions&lt;/p&gt;
&lt;p&gt;The class which they call for builtin them is the class&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#0033ff&quot;&gt;&lt;strong&gt;gtk.Button(label=None, stock=None, use_underline=True)&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/font&gt;As you determine it, there are three accepted, but not obligatory parameters&lt;br /&gt;It is wholly possible to put one no parameter parentheses&lt;/p&gt;
&lt;p&gt;Let us itemize these parameters&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#9966ff&quot;&gt;&lt;strong&gt;label &lt;/strong&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; There I think that it&apos;s not necessary to stretch over question as much as two of my last threads deal with labels.&lt;br /&gt;&lt;/font&gt;&lt;font color=&quot;#9966ff&quot;&gt;&lt;strong&gt;stock&lt;/strong&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; The item corresponding to the picture allows to stock which they want to show&lt;/font&gt;&lt;font color=&quot;#9966ff&quot;&gt; - &lt;a href=&quot;http://www.pygtk.org/docs/pygtk/gtk-stock-items.html&quot;&gt;liste des items ici&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;use_underline&lt;/strong&gt;
&amp;nbsp; &amp;nbsp; Allow the definition of parameters of abbreviated one composing of the key &apos;
ALT + &apos; letter of the text that they put in front of one &apos;_ &apos; of
(Underscore)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;By default, &lt;em&gt;label=None&lt;/em&gt;, &lt;em&gt;stock=None&lt;/em&gt; et &lt;strong&gt;use_underline=True&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;Let us pass to the practical party now&lt;/p&gt;
&lt;p&gt;&lt;u&gt;General code - simple button&lt;/u&gt; :&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;font color=&quot;#ff6600&quot;&gt;#!/usr/bin/env python&lt;br /&gt;# -*- Encoding: Latin-1 -*-&lt;br /&gt;&lt;br /&gt;import pygtk&lt;br /&gt;pygtk.require(&apos;2.0&apos;)&lt;br /&gt;import gtk&lt;br /&gt;&lt;br /&gt;def fenetre():&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre = gtk.Window(gtk.WINDOW_TOPLEVEL)&lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre.set_default_size(400, 200)&lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre.set_title(&amp;quot;Ma premiere fenetre&amp;quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; bouton1 = gtk.Button()&lt;br /&gt;&amp;nbsp; &amp;nbsp; ..........&lt;br /&gt;&amp;nbsp; &amp;nbsp;&lt;font color=&quot;#666666&quot;&gt; &amp;quot;&amp;quot;&amp;quot; code to add &amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; ..........&lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre.add(bouton1)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre.show_all()&lt;br /&gt;&amp;nbsp; &amp;nbsp; gtk.main()&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;if __name__ == &apos;__main__&apos;:&lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre()&lt;/font&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;u&gt;Result :&lt;/u&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;a target=&quot;_blank&quot; href=&quot;http://storage.canalblog.com/76/45/287253/24328092.png&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;84&quot; border=&quot;0&quot; src=&quot;http://storage.canalblog.com/76/45/287253/24328092_p.png&quot; alt=&quot;btn_simple&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;u&gt;Button with label &lt;/u&gt;:
&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#ff6600&quot;&gt;..........&lt;br /&gt;&lt;/font&gt;&lt;font color=&quot;#ff6600&quot;&gt;&amp;nbsp; &amp;nbsp; label = gtk.Label()&lt;br /&gt;&amp;nbsp; &amp;nbsp; bouton1.set_label(&amp;quot;Cliquer ici&amp;quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; bouton1.add(label)&lt;br /&gt;..........&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Result &lt;/u&gt;:&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://storage.canalblog.com/03/90/287253/24299043.png&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;84&quot; border=&quot;0&quot; alt=&quot;btn_label&quot; src=&quot;http://storage.canalblog.com/03/90/287253/24299043_p.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;&lt;br /&gt;Button with label / html &lt;/u&gt;:&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#ff6600&quot;&gt;..........&lt;br /&gt;
&lt;/font&gt;&lt;font color=&quot;#ff6600&quot;&gt;&amp;nbsp; &amp;nbsp; label = gtk.Label()&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; label.set_markup(&amp;quot;&amp;lt;span font_desc=\&amp;quot;Courier New 10\&amp;quot; foreground=\&amp;quot;red\&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Cliquer ici&amp;lt;/b&amp;gt;&amp;lt;/span&amp;gt;&amp;quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; bouton1.add(label)&lt;br /&gt;
..........&lt;/font&gt;&lt;br /&gt;&lt;u&gt;&lt;br /&gt;Result &lt;/u&gt;:&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://storage.canalblog.com/22/67/287253/24299375.png&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;83&quot; border=&quot;0&quot; alt=&quot;btn_label_html&quot; src=&quot;http://storage.canalblog.com/22/67/287253/24299375_p.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;&lt;br /&gt;button with combination of keys&lt;/u&gt;&lt;u&gt;&amp;nbsp;&lt;/u&gt;:&lt;/p&gt;
&lt;p&gt;In the list of parameters, let us say that use_underline is speeded up by default (True)&lt;br /&gt;Because of this or that they can directly pass to the creation of necessary code to speed up the abbreviated&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#ff6600&quot;&gt;..........&lt;br /&gt;
&lt;/font&gt;&lt;font color=&quot;#ff6600&quot;&gt;&amp;nbsp; &amp;nbsp; label = gtk.Label()&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; bouton1.set_use_underline(1)&lt;br /&gt;&amp;nbsp; &amp;nbsp; bouton1.set_label(&amp;quot;&lt;strong&gt;_&lt;/strong&gt;Cliquer ici&amp;quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; bouton1.add(label)&lt;br /&gt;
..........&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;In example, I decided to put an abbreviated on &apos; c &apos; of departure, therefore I put &apos;_ &apos; just before&lt;br /&gt;If I had opted for another letter, it would have been necessary that I put it directly in front of this letter&lt;br /&gt;To speed up the underline of the letter in the screen, it is necessary to make call to function&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;font color=&quot;#666666&quot;&gt;set_use_underline(param)&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;&lt;em&gt;&lt;font color=&quot;#999999&quot;&gt;param correspond au param&#xe8;tre &#xe0; passer &#xe0; la fonction :&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; 1 : soulignement activ&#xe9;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; 0 : soulignement d&#xe9;sactiv&#xe9;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;By applying this method, the chosen letter is underlined, what points
out that to make ALT+C would be equivalent to click on the button with
the aid of the mouse&lt;/p&gt;
&lt;p&gt;&lt;u&gt;R&#xe9;sultat &lt;/u&gt;:&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://storage.canalblog.com/78/85/287253/24300686.png&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;84&quot; border=&quot;0&quot; alt=&quot;btn_raccourci&quot; src=&quot;http://storage.canalblog.com/78/85/287253/24300686_p.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Button with picture &lt;/u&gt;:&lt;/p&gt;
&lt;p&gt;A precondition consists in going to choose items in the list of gtk stock items link of which I put in the detail of the parameters of the
class gtk.Button ().&lt;br /&gt;It will be necessary to recover the name of item - in my example below, it is of gtk.STOCK_SAVE.&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Code &lt;/u&gt;:&lt;/p&gt;
&lt;p&gt;&lt;font color=&quot;#ff6600&quot;&gt;&amp;nbsp; &amp;nbsp; ..........&lt;br /&gt;&amp;nbsp; &amp;nbsp; bouton1 = gtk.Button(&lt;font color=&quot;#0033ff&quot;&gt;stock=gtk.STOCK_SAVE&lt;/font&gt;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; fenetre.add(bouton1)&lt;br /&gt;&amp;nbsp; &amp;nbsp; ...........&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Result &lt;/u&gt;:&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://storage.canalblog.com/51/82/287253/24302513.png&quot;&gt;&lt;img width=&quot;150&quot; height=&quot;84&quot; border=&quot;0&quot; src=&quot;http://storage.canalblog.com/51/82/287253/24302513_p.png&quot; alt=&quot;btn_item&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;</description><pubDate>Sat, 12 Apr 2008 18:43:13 GMT</pubDate></item></channel></rss>