How to change font of a menuItem?



Hello,

I create menu items using

  my $menu = Gtk2::Menu->new() ;
  my $mI ;

  $mI = Gtk2::MenuItem( "blah") ;
  $menu->append( $ml ) ;

How can I change the font of the menu item (specifically, I want to
show some menu items in bold) later during the execution of the
program?

I have tried the following, but without success:

my $testfont = Gtk2::Pango::FontDescription->new ;
$testfont->set_weight( 'bold' ) ;
$mI->modify_font( $testfont ) ;

Thanks!

j.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]