GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Mon Dec 22, 2014 2:15 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Accessing widgets that aren't part of window1
PostPosted: Mon Mar 25, 2013 1:37 am 
Offline
Familiar Face

Joined: Tue Jan 01, 2013 4:57 pm
Posts: 6
I want to have a widget open a menu when you right-click on it. Everything works fine in terms of the event masking etc. but the problem is that the builder doesn't seem to contain the menu widget because it's not part of the main window1 tree. When I try to call @builder["my_menu"] it returns nil. Calling up one of the menus stored in the main menubar, which is part of the window1 tree, it works fine, so I guess @builder isn't loading the special menu because it's not a child of window1. Is there a way to access widgets outside the main tree, or does it have to be part of the main tree and just "hidden" or some such?

(To clarify, right now the menu widget is set as another top-level widget beside window1 in the Glade interface.)


Top
 Profile  
 
 Post subject: Re: Accessing widgets that aren't part of window1
PostPosted: Mon Mar 25, 2013 7:18 pm 
Offline
Familiar Face

Joined: Tue Jan 01, 2013 4:57 pm
Posts: 6
Okay, well I found a workaround for this particular problem by just building a menu widget on the spot that pops up instead of trying to load the widget from Glade. Still, I'd like to know if it's possible to do this.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group