News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHP-GTK Community Site:
Extending GtkMenu class for Popup menu dialog
March 23, 2007 @ 11:38:00

On the PHP-GTK Community site today, there's a "quick hit" post for extending a GtkMenu object in a PHP-GTK application to create a popup menu dialog.

Here is a quick way to build a popup menu supporting event registration from a GtkWidget. Menu items are passed to the class constructor as a list of labels. This class emits activate signals with full context (x,y coordinates, button ...).

There's the list of the steps that the code will follow and the two code chunks that will make it happen - the sample PHP-GTK app and the class file that handles the menu creation.

1 comment voice your opinion now!
phpgtk tutorial gtkmenu popup menu dialog phpgtk tutorial gtkmenu popup menu dialog


PHP-GTK Community Site:
Add icons to GtkMenu
December 12, 2006 @ 08:56:00

On of the next steps up from building a regular menubar or toolbar in your PHP-GTK application is the addition of icons to help liven up the menus and help users quickly find what they want. This new tutorial on the PHP-GTK Community Site aims to help with just that.

When creating a soft, you'll often want to have a menu like in the majority of graphical softs. It's often clear in your mind but require more code than you want to do simple things using a plain GtkMenu. So here's a class to help you to quickly design such menus and will also allow you to display nice icon in your menus.

They start with a usage example before getting into the code of the class - a simple menu with a "file" and "help" top menus and under "file", "open" and "exit".

The complete code for the class is included in the post so it's a simple cut and paste away from being yours.

4 comments voice your opinion now!
phpgtk gtkmenu tutorial icon example phpgtk gtkmenu tutorial icon example



Community Events











Don't see your event here?
Let us know!


language install release opinion symfony2 unittest package composer component framework hhvm security code example overview introduction application facebook podcast hack

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework