Message-ID: <4519A852.8090105 at rftp.com> Date: Tue, 26 Sep 2006 15:23:14 -0700 From: Robert Roessler Organization: Robert's High-performance Software MIME-Version: 1.0 To: LablGTK List Subject: Re: menu tool button? References: <450BC493.6050509 at rftp.com> In-Reply-To: Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Length: 1500 Maurizio Colucci wrote: > On 9/16/06, Robert Roessler wrote: >> Maurizio Colucci wrote: >> > My app does not have a menu but only a toolbar. However I need one of >> > the toolbar buttons to pop up a menu when it is pressed. I believe this >> > is called GtkMenuToolButton. I can't seem to find it in lablgtk 2.6.0 . >> > I guess this will be added in the next release. In the meantime, I was >> > wondering if there is any workaround (other than adding a menu to my >> > app). Thanks for any help. >> >> Why not just show a popup when you see a clicked event on that button? > > I don't know how... if I do > > menu#popup ~button:0 ~time:(GtkMain.Main.get_current_event_time ()) > > the menu is opened at the mouse position, not below the button... > > Any idea? Well, I see your point about the popup method... ;) Since LablGTK does not fully wrap the gtk_menu_popup API call, it forces the use of the default positioning func - which uses the mouse position. I use the UI Manager to build menus and handle menu interactions, but I also pack multiple menu-bar segments, buttons, and entry fields together across the top of my app... as this allows for mixing menus, buttons, and other controls, you can have pretty much any interface style you might want. So in my case, menu-bar items drop down menus and "tool-bar" buttons actually popup mini-dialogs. Perhaps an approach like this would work for you. Robert Roessler robertr@rftp.com http://www.rftp.com