Colored Table, Row and Column Headers In Textview.

// Definition of widgets
$scrolled_win = new GtkScrolledWindow();
$textview = new GtkTextview();
$buffer = new GtkTextBuffer();
$win = new GtkWindow();

// Modify widgets
$textview->modify_font(new PangoFontDescription('Courier New 14'));
$win->connect_simple('destroy', array('Gtk', 'main_quit'));

// Pack widgets

/*** Get tags table ***/
$tag_table = $buffer->get_tag_table();

/*** Create and add tag ***/
// underline

Apply style to Textview: Underline and Blue Color on specific parts of the text.

This script displays a 2D array inside a textview. All elements on the same row and coloumn are underlined and colored blue.

CommandWidget - a terminal like widget for php-gtk

Command widget demo The CommandWidget is nearly like a terminal and allows the user to issue commands to a shell and view the result in a GtkTextView widget.

Accessing geo-nick from a php-gtk2 application

The previous page defined the geo-nick API of the site. Here is a small example of how to use it from a client application, using either the CURL library, or native PHP coding to send the request and retrieve the XML-RPC results from the site.

Syndicate content