Using a TreeStore with a ComboBox



Using a treestore model with a combobox creates a nice dropdown list with submenus. Inside each submenu, the parent item is shown with a separator below to separate it from its children. I want to know how I can hide this parent node, so I can only select leaf nodes (e.g items without children).

The model contains places that can be are arranged by the user in an arbitrary hierarchy, to group related places together (for instance by continent and/or country). This is very similar how files (my places) can be arranged into directories (my hierarchy). But when the user needs to select a place with the combobox, it doesn't make sense to be able to select an item that is not a place.




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