popup_at_widget


Description:

[ Version ( since = "3.22" ) ]
public void popup_at_widget (Widget widget, Gravity widget_anchor, Gravity menu_anchor, Event? trigger_event = null)

Displays this and makes it available for selection.

See gtk_menu_popup_at_pointer () to pop up a menu at the master pointer. gtk_menu_popup_at_rect () also allows you to position a menu at an arbitrary rectangle.

![](popup-anchors.png)

this will be positioned at widget, aligning their anchor points. widget_anchor and menu_anchor determine anchor points on widget and this to pin together. this can optionally be offset by rect_anchor_dx and rect_anchor_dy.

Anchors should be specified under the assumption that the text direction is left-to-right; they will be flipped horizontally automatically if the text direction is right-to-left.

Other properties that influence the behaviour of this function are anchor_hints and menu_type_hint. Connect to the popped_up signal to find out how it was actually positioned.

Parameters:

this

the Menu to pop up

widget

the Widget to align this with

widget_anchor

the point on widget to align with this's anchor point

menu_anchor

the point on this to align with widget's anchor point

trigger_event

the Event that initiated this request or null if it's the current event