GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Sep 01, 2016 1:52 am

All times are UTC

Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Menu Placement
PostPosted: Tue Jan 22, 2008 11:35 am 

Joined: Tue Jan 22, 2008 11:24 am
Posts: 3
I need help trying to position a menu. Im using the following:

gtk_menu_popup (GTK_MENU (widget), NULL, NULL, GtkMenuPositionFunc(GTK_MENU (widget),100,100,TRUE,NULL), NULL,
bevent->button, bevent->time);

but am getting the following errors:
error: expected expression before ‘GtkMenuPositionFunc’
error: too few arguments to function ‘gtk_menu_popup’

 Post subject: A couple of problems..
PostPosted: Wed Jan 23, 2008 1:18 am 
Familiar Face

Joined: Thu Jan 10, 2008 8:54 pm
Posts: 7
You have a couple of problems as I see it:

1. You did not give enough parameters to gtk_menu_popup: you are missing a variable for activate_time at the end of the call.

2. For the GtkMenuPositionFunc you need to give a name of the function that will position the menu as seen here the function receives the menu and should output some position information.


 Post subject:
PostPosted: Thu Jan 24, 2008 8:07 pm 
Never Seen the Sunlight

Joined: Thu Jun 14, 2007 11:02 pm
Posts: 923
Location: Falun, WI USA
also, the activate_time parameter mentioned should just need to be event->time for most events, so if this is a callback, then that shouldn't be a problem

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

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