Web hosting and cheap domain register services
  

 Home

GtkCList
Prev GtkCList Constructor Next

GtkCList Constructor

GtkCList (int columns, Array titles]);

Creates a new GtkCList object with the given number of columns. The optional second parameter is an array of strings which are uses as column titles.

The columns can be resized with the set_column_width function.

<?php
if( !extension_loaded('gtk')) {	
	dl( 'php_gtk.' . PHP_SHLIB_SUFFIX); 
}

$win = &new GtkWindow();
$win->set_default_size(200,300);
$win->connect('destroy', 'destroy');

function destroy() {
	Gtk::main_quit();
}

$arStatistics	= array(
 array( 'Paris', 9.1),
 array( 'Moscow', 9.0),
 array( 'London', 6.8),
 array( 'Rome', 3.8),
 array( 'Berlin', 3.4),
 array( 'Athena', 3.0)
);

$scrolled_win = &new GtkScrolledWindow();
$scrolled_win->set_policy( GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);

$list = &new GtkCList( 2, array( "City", "Inhabitants (M)"));

foreach( $arStatistics as $arStat) {
	$list->insert( 0, $arStat);
}

$list->set_column_width( 0, 90);

$scrolled_win->add( $list);
$win->add( $scrolled_win);
$win->show_all();
GTK::main();
?>

The numbering of a position parameter for a column or row starts at 0.


Prev Home Next
GtkCList Up GtkCList::set_hadjustment

 

  

Network sites:

Active-Domain.com: cheap domain register and domain name registration

Cheap domains registration and domain transfer with free domain hosting 

 
 
Quotes:
When a true genius appears in this world, you may know him by this sign, that the dunces are all in confederacy against him.  
 
 

Disclaimer: This documentation is provided only for the benefits of our webhosting customers.
For authoritative source of the documentation, please refer to http://gtk.php.net/docs.php