I have been trying several ways to get this done, but I am stuck, I can access the model, but I cannot access the view part to set the option disabled with set_sensitive I cannot find any example or documentation that mention how to do this. I have a comboboxtext object inside combobox variable, and the id inside id. this is what I did:
auto model = combobox.get_model();
for (auto iter = model->children().begin();
iter != model->children().end(); ++iter) {
auto row = *iter;
std::string value;
row->get_value(1, value);
if (value == id) {
// disable the row
???
break;
}
}
I cannot find a way to access the selected row cellRenderer to do a sensitive false. Basically, I was unable to access the internals of the ComboBoxText I am able to extract the model and some parts of it, but nothing usable. (version 4 provides get_column_types in the model, but not version 3)
What I did after a lot of trial and error is give up and use a normal combobox. I'm leaving a sample code so others that are looking for an example finds something useful and don't waste five days researching. There are a couple of ways to do this, but is just an example:
Hope someone finds the answer, will be cool to see it. Thanks.