PHP-GTK
Friday, November 28, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkRadioButton
GtkRadioButton::get_groupnext

Last updated: Sun, 12 May 2013
view this page in English

GtkRadioButton Constructor

GtkRadioButton ([GtkRadioButton group [, string text [, bool use_underline = true]]]);

Creates a new radio button.

Example 107. Creating GtkRadioButtons

<?php
$box = new GtkVBox();
 
$label = new GtkLabel("click a button\n");
$box->pack_end($label);
 
$radio = null;
foreach (array('Red', 'Green', 'Blue') as $strLabel) {
    $radio = new GtkRadioButton($radio, $strLabel, true);
    $box->pack_start($radio);
    $radio->connect('toggled', 'onToggle', $label);
}
 
function onToggle($radio, $label)
{
    $label->set_text("toggled:\n" . $radio->get_label());
}
 
$wnd = new GtkWindow();
$wnd->connect_simple('destroy', array('gtk', 'main_quit'));
$wnd->add($box);
$wnd->show_all();
Gtk::main();
?>

User Contributed Notes
gtk.gtkradiobutton.constructor.php
add a note about notes
There are no user contributed notes for this page.


previousGtkRadioButton
GtkRadioButton::get_groupnext

Last updated: Sun, 12 May 2013
view this page in English


credits 

PHP  Copyright © 2001-2014 The PHP Group
 All rights reserved.
Last updated: Sun May 12 20:50:59 2013 CEST