Where is ListItem's 'sensitive' property?

I noticed that gtk4-rs ListItem does not have a sensitive property, and neither does the C api. Curiously, when I open Gtk’s element inspector, go to GtkListItemWidget and toggle the sensitive property it does exactly what I need. It grays out the item, prevents selection, and disables activation events for that item.

What’s the rationale behind sensitive not being exposed in the API, and what’s the proper way to set it programmatically? I’ve tried setting selectable and activatable but that doesn’t replicate the grayed out styling.

A GtkListItem is not a widget, so it can’t have a “sensitive” property.

Typically you bind the “sensitive” property of the widget you set as the child of the list item to a property on the model’s item that represents the data.

When I programmatically set the sensitive property of the child to false, the activate event of the disabled list item still triggers. Am I missing something perhaps?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.