How to set the font and font size of GtkLabel in PHP GTK

|
If you want to change the font and font size of GtkLabel in PHP GTK 2. may this post is helpful to you.
<?php
/* 
PHP GTK tutorials
website: http://phpgtktutorials.blogspot.in/
*/
$window = new GtkWindow();
$window->set_size_request(500, 300);
$window->modify_bg(Gtk::STATE_NORMAL, GdkColor::parse("#FFFF00"));
$window->connect_simple('destroy', array('Gtk','main_quit'));
$label = new GtkLabel("hello buddy!");
$label->modify_font(new PangoFontDescription('Times New Roman 48')); // set font style 
$window->add($label);
$window->show_all();
Gtk::main();
?>

0 comments:

Post a Comment