3

I can't bind Gtk.Popover() to button.

3

You can associate the popover creation with a button event, like in the following example:

var button = new Gtk.Button (); 
var imag = new Gtk.Image.from_icon_name ("help-info", Gtk.IconSize.MENU);
button.add (imag);
button.clicked.connect (() => {
    var pop = new Gtk.Popover ();
    //set popover content
    pop.set_parent_pop (window);
    pop.move_to_widget (button);
    pop.show_all ();
    pop.present ();
    pop.run ();
    pop.destroy ();
});

More info about Gtk.Popover :

Valadoc.org

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.