Re: Popup menu position



connect show_popup() to a button press event.

Ie.

void
Graph::attach_signals()
{
  widget_instance->signal_button_press_event().connect( sigc::mem_fun( *this, &Graph::show_popup ) ) ;
}

bool
Graph::show_popup( GdkEventButton* event )
{
    if( event->button == 3 )
    {
        _menu->popup( event->button, event->time ) ;
    }

    return true ;
}


On 10/4/06, yao kouakou <ykouakou yahoo fr> wrote:
Hello everybody,
 
I am trying to change the position of a popup menu in my main windows. I see that there is a function
popup (const SlotPositionCalc & position_calc_slot, guint button, guint32 activate_time)
 
but i don't know how to use this first argument. Could somebody give me a simple example of using this fucntion?
 
Thanks
Yao


Découvrez un nouveau moyen de poser toutes vos questions quel que soit le sujet ! Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences. Cliquez ici.


_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list





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