Desktop Gadget - a small widget moving around your screen

DesktopGadget demo 1 The DesktopGadget is a small window moving around you desktop screen ; it's a container widget and is able to contains usefull object for short information or notification.

Easily empty GtkContainer/GtkWindow

This function provides an easy way to empty a GtkWindow/GtkContainer. I use it when i need to refresh a part of my app by replacing some widgets with others. It can destroy or preserve the child widgets depending on your needs.

Managing Multiple Windows


This code snippet shows one of the many ways to handle multiple windows in PHP-GTK 2. In the following example will build 3 classes (Application, GtkWindow_One and GtkWindow_Two).

Stock dialog: MsgBox

PHP-GTK 1 message box When working in graphical user interface mode, one often needs to display a message to the user who's waiting for an action, like a confirmation box as this is a frequent task, here's a class to do this efficiently with minimal application code.

Inspecting class methods

This examples shows how to discover on your own what the methods for a given widget are, from the actual current implementation, instead of relying on documentation. You can obviously use it to examine other classes, but this sample code shows the methods of classes Gtk and GtkWindow.

In addition, this example shows how to line up vertically by the top the contents of panes in a GtkHBox, just like vertical-align does in CSS. In this example, we use it to align the two lists because they are of very different lengths.

Fast starting with Glade 1

Firstly, in a oop style, we create an App class. In that class there are 2 methods, one for loading .glade files (your GUI), and one for getting widgets created .

Syndicate content