[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-gtk-doc
Subject:    [PHP-GTK-DOC] cvs: php-gtk-doc /examples/reference/gtk/gtkscale format-value.phpw  /images/reference
From:       "Scott Mattocks" <scottmattocks () php ! net>
Date:       2006-05-30 19:07:28
Message-ID: cvsscottmattocks1149016048 () cvsserver
[Download RAW message or body]

scottmattocks		Tue May 30 19:07:28 2006 UTC

  Added files:                 
    /php-gtk-doc/images/reference/gtk/gtkscale	format-value.png 
    /php-gtk-doc/examples/reference/gtk/gtkscale	format-value.phpw 
  Log:
  Image and example for GtkScale.
  

http://cvs.php.net/viewcvs.cgi/php-gtk-doc/examples/reference/gtk/gtkscale/format-value.phpw?view=markup&rev=1.1
                
Index: php-gtk-doc/examples/reference/gtk/gtkscale/format-value.phpw
+++ php-gtk-doc/examples/reference/gtk/gtkscale/format-value.phpw
<?php
// Callback to format the value of the scale.
function format_value($scale, $value)
{
	return 'Value: ' . $value;
}

// Create a window.
$window = new GtkWindow();

// Set it up to close cleanly.
$window->connect_simple('destroy', array('Gtk', 'main_quit'));

// Create a scale.
$scale = new GtkHScale(new GtkAdjustment(5, 0, 10));

// Create a signal handler for the format-value signal.
$scale->connect('format-value', 'format_value');

// Add the scale to the window.
$window->add($scale);

// Show the window.
$window->show_all();

// Start the main loop.
Gtk::main();
?>

-- 
PHP-GTK Documentation Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic