Posts

Showing posts from November, 2018

Python Glade : Connection between label and button

Image
Python Glade : Connection between label and button  (Screen Shot) ******************************************* import  gi gi.require_version(' Gtk ', ' 3.0 ') from gi.repository import Gtk class   Handler :     def  OnShowClick (self,button):         x.builder.get_object(" label1 ").show_all()         def  OnChangeClick (self,button):         x.builder.get_object(" label1 ").set_text(" My name is khafi ")         def  OnHideClick (self,button):         x.builder.get_object(" label1 ").hide_on_delete()         def  OnExitClick (self,button):         x.builder.get_object(" window1 ").destroy()   class Example:     def __init__(self):         self.builder = Gtk.Builder()         self.builder.add_from_file(" Khafi.glade ") ...

Glade Python : Image Viewer

Image
Glade Python : Image Viewer (Screen Shot) Python Glade Image Viewer : import os import sys import gi gi.require_version(' Gtk ', ' 3.0 ') from gi.repository import Gtk, Gio, GdkPixbuf class Handler :      def OpenButtonClick (self,button):                              dialog = Gtk.FileChooserDialog(" Choose a Image ",                                     None,                                      Gtk.FileChooserAction.OPEN,                                     (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,                             ...

Glade Python : How to show about form

Image
Glade Python : How to show about form (Screen Shot) To show about form :   def  OnAboutClick (self,button):         x.builder.get_object(" aboutdialog1 ").show_all()    

Python Glade : Exit Button Code

Python Glade Tutorial :  def OnExitClick(self,button):         x.builder.get_object(" window1 ").destroy()