GtkTreeStore in a ComboBox



I'm trying to get a TreeStore in a ComboBox to look like I want but
haven't been able to do so.

I'm trying to design a form to be used with a database of business
records.

I have categories under "Income" and "Expense", which I wish to be
separated from each other.  I can get the setup I want by creating a
TreeStore with 'Income' and 'Expense' as top-level rows and each
category under the respective top-level.  When I click on the ComboBox,
I get a pop-up menu with "Income" and "Expense" displayed (separated by
a separator) - this is well and good.  But when I come to the submenus,
I have the top-level name, i.e. "Income" or "Expense" displayed, under
it a separator, and then the categories.  I'd prefer that the top-levels
were not displayed in the sub-menu, or at least were not clickable.  But
I've not been able to find a solution.

I'll attach a simple test program with which I've been experimenting.
It's written in Perl - I contemplated sending it to the gtk-perl list,
but I think my question is more of a gtk question.

If anyone can point me in the right direction - or tell me a better way
- I'd greatly appreciate it.


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