I'm really new to php-gtk and I'm having trouble with styles.
I'm trying to get a table with any cell of different color using EventBox, but I get always grey boxes. I think the problem is that boxes are in a gtknotebook. This is my code with only one cell, could anyone helpme? Ty :)
| Code: |
<?php
$ntbk = new GtkNotebook();
$tab_option= new gtktable(2,2,true);
$ntbk->append_page( $tab_option, new GtkLabel('Option'));
$box = new GtkEventBox;
$box->modify_bg(gtk.STATE_NORMAL,GdkColor::parse('yellow'));
$tab_option->attach($box,0,1,0,1);
$wnd = new GtkWindow();
$wnd->set_default_size(800, 600);
$wnd->connect_simple('destroy', array('Gtk', 'main_quit'));
$wnd->add($ntbk);
$wnd->show_all();
Gtk::main();
?> |