Personal tools
You are here: Home / cmgui / Wiki / Gtk2 Perl Rc style
Navigation
Log in


Forgot your password?
 

Gtk2 Perl Rc style

I spent a number of hours figuring out how to force the scroll bar on the side of a GtkComboBox.

The setting is a Style Property

'"appears-as-list" gboolean : Read'

So to set it you have to override the theme from your gtkrc.

This how I did it in Perl, add the code before making any ComboBoxes:

#Override the combobox style so we always get a list
my $combobox_style = <<EOS
  style "combobox_style"
  {
    GtkComboBox::appears-as-list = 1
  }
  class "GtkComboBox" style "combobox_style"
EOS
       ;
Gtk2::Rc->parse_string($combobox_style);