Personal tools
You are here: Home cmgui Wiki Gtk2 Perl Rc style
Views
FrontPage >> Shanes notes >>

Gtk2 Perl Rc style

last edited 6 years ago by blackett

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);

Contributing to this site

Please add to the wiki any relevant information that you think might be useful to other users of this website. For example, you might like to contribute your experiences, questions and answers.

You are encouraged to contribute to this site regardless of your level of experience. Contributions are welcomed from new and regular visitors.

If you ask a question and receive an answer from a developer you should record it in the wiki. This information is extremely useful and can help other users overcome the same problem.

See how to add and edit pages for more information.