Re: How do I create a multi column popup menu
- From: "Ronnie Sahlberg" <ronnie_sahlberg ozemail com au>
- To: "Gustavo J A M Carneiro" <gjc inescporto pt>
- Cc: <gtk-app-devel-list gnome org>
- Subject: Re: How do I create a multi column popup menu
- Date: Sat, 30 Aug 2003 12:11:57 +1000
I could do that but in this case i think it would be clearer if all options
were shown at once and
I do not know at compile time what entries there might be in the list.
I dont even know at runtime until I actually want to bring the popup menu up
what entries there might
I dont want to sort the entries.
Some of the instances where i need to do this there is no intuitive way to
divide them into submenus and it would confuse users
to hae to search through submenus until they find the item they want.
Is it possible to create multicolumn popup menus?
----- Original Message -----
From: "Gustavo J A M Carneiro"
Sent: Saturday, August 30, 2003 12:30 AM
Subject: Re: How do I create a multi column popup menu
Why not creating submenus (by topic, alphabetical, whatever) and sort
the menu items into one of several submenus?
A Sex, 2003-08-29 às 09:16, Ronnie Sahlberg escreveu:
(I am not subscribed but reads the list through the web archive
I am one of the developers of a GPL application that uses the GTK
since .org was already taken))
I have one problem now that I dont know how to solve:
Some of the popup menus in ethereal have a lot of different menu items
them, so many that the menu is higher than the screen height and
thus not all of them can be seen.
I have seen applications that do popup menus that are multicolumn.
Can someone please tell me or show with a small example how I can create
multicolumn popup menu?
(beware the code must support both gtk1.2 and gtk2, we have some
compatibility macros to help do this with a single common codebase)
Dont laugh at the code, Im not a toolkit person. I do protocols, not
gui's. Its based on cut-n-paste from examples. It works.
The first instance is when needing to create a popup menu at runtime.
is created this way since we dont know at compile time how many items
the menu will have or what they will be. So there is some code to
menu and then a loop with callbacks to add the actual entries to it:
This snippet creates the menu and goes through an enumerator
(g_hash_table_foreach() to add all the items)
/* Program menu */
gtk_box_pack_start(GTK_BOX(prog_box), prog_opt, TRUE, TRUE, 0);
The individual menu items are added as :
SIGNAL_CONNECT(menu_item, "activate", dcerpcstat_program_select, k);
Question: How can I up in the snippet above specify that there should
vertical separator to split the menu in two (or more) columns?
thanks for any response
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
Gustavo J. A. M. Carneiro
<gjc inescporto pt> <gustavo users sourceforge net>
] [Thread Prev