#native_company# #native_desc#
#native_cta#

Getting Started with PHP-GTK: Part 1 Page 5

By Ray Hunter
on August 26, 2004

Finishing Up
We finish this all up with the following code:

<?php

$window
->show_all();

Gtk::main();

?>



These last to lines of code finish off the sample example program. The last method called on the
window object is the show_all method that is derived from the GtkWidget class.
The show_all method displays the widget and all the children of this widget. I definitely recommend checking out the
GtkWidget::show_all and GtkWidget::show
methods for additional information on when to use them.
For this simple example, it is sufficient to call the show_all method to display the window and the
button widget. Last, we call the Gtk function main. The main function gives you Gtk gui application
a loop process that allows it to continue handling user input until the application is terminated.

As you can see from this simple example, that creating quality gui based PHP applications is fast and
straight forward. As you get started with your own PHP-GTK applications, I would suggest reviewing the
Gtk classes and functions. The PHP-GTK site has great documentation and provides many great links to other
resources and applications that others have written using PHP-GTK.

1
|
2
|
3
|
4
|
5

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:

Ray Hunter

Comment:



Comment: