News Feed
Sections




News Archive
feed this:

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

Elizabeth Smith's Blog:
Treeviews and Cell Renderer Properties - Practical PHP-GTK
October 07, 2008 @ 07:53:09

New on her blog Elizabeth Smith talks about tree views and rendering in a PHP-GTK application (with sample code included).

I get this question a lot - "How do I change the background color of a single cell in a treeview?" If you look around you'll see a couple of ways of doing this using display callbacks and other highly processor and memory intensive methods - but there's a much simpler way.

She explains how the tree views are rendered (with the GtkTreeView component, of course) via a "cell renderer" with different variations based on the contents of the cell - each with their own properties. Her example code illustrates how to manipulate this by making the tree object and attaching other columns to it with custom background properties. A quick screencast is included to show it in action.

0 comments voice your opinion now!
treeview phpgtk window cell renderer property tutorial


php|architect:
Managing Layout in PHP-GTK 2
June 23, 2006 @ 13:45:20

On php|architect's A/R/T article repository today, there's the next in a continuing series Scott Mattocks is doing on PHP-GTK 2. This time, he looks at how to manage the layout of your application with the given functionality.

In the last article, "Hello PHP-GTK", we looked at what it takes to create a simple application. At the end, we were left with a PHP-GTK implementation of "Hello World". The application was very simple. Too simple. All it did was display one line of text in a window. In this article we will expand on the previous article by adding more content to the window. Along the way we will look at how parents and children interact and what it takes to make children behave properly.

He starts by explaining the parent child relationship between the base window and other children (spawned) windows, mentioning the GtkWindow and GtkObject widgets. With windows down, he moves on to "boxes", seperation areas inside the windows to help organize the content (including ways to frame them in). And, to wrap it all up, a look at GtkTable, a widget that helps you create a nicely laid out table inside of your window (simpler than several boxes).

0 comments voice your opinion now!
php-gtk managing layout boxes table window parent child php-gtk managing layout boxes table window parent child



Community Events





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


update library deployment symfony unittest install podcast opinion language interview zendserver api introduction laravel series tips community framework package release

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