GtkComboBox with a tree view

Hi all,

I have several use cases where I need to select one item in a big tree view, typically as a parent for creating a new node.

I'm using a GtkTreeView but I think it takes too much space while I already have the right parent in most of the cases. In some dialogs, I have used an expander to hide the tree view but I think using a GtkComboBox will be better.

However there are two issues with the GtkComboBox. First, setting it to use a tree view instead of menus is not really straight forward. Then except with quite small tree, the creation of the widget takes so much time that it's unusable.

Could I rely on the fact that the GtkComboBox will display the items as a tree view? I means is it a bug if a theme doesn't do it correctly or it is rather just an hint. Does it makes sense to add a function to easily set this?

Is it useful that I spend time on GtkComboBox code trying to make it faster? As the GtkTreeView is much faster, I suppose we can reach the same performance with the GtkComboBox. Or do we consider that the GtkComboBox is designed to handle only a small number of items? As the list contains a lots of items, it will make sense to have the interactive search entry of the GtkTreeView too.

Or is the right solution is to use a GtkButton displaying a real GtkTreeView instead of using a GtkComboBox?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]