Kjell 2012-02-16 21:17, Curtis Gedak skrev:
In gtkmm-3.0, how does one create a combo box that has some entries that are not selectable or grayed out?To help illustrate the problem I am using the tutorial code for a Combo Box from the following link: http://developer.gnome.org/gtkmm-tutorial/unstable/combobox-example-full.html.enThis code creates a combo box with three entries (depicted in text below).In this example all three of the entries are selectable. +---------------------+ | 1 Billy Bob | +---------------------+| 2 Joey Jojo | <-- I would like this entry to be not selectable/grayed out.+---------------------+ | 3 Rob McRoberts | +---------------------+ I would like to make one or more entries not selectable and grayed out. From searching the Internet, the closest I have come is to learn that: The solution was to pack a Gtk::CellRendererText into the Gtk:ComboBox manually and use set_cell_data_func to set the "sensitive" property of the renderer to false... Quote above is from the following link: http://mail.gnome.org/archives/gtkmm-list/2007-June/msg00148.htmlUnfortunately I have been unable to find sample code that demonstrates this ability.Any help with this challenge would be greatly appreciated. Sincerely, Curtis Gedak (Maintainer of GParted)
Attachment:
ComboBox_not_selectable.tar.gz
Description: GNU Zip compressed data