Python GUI Development with GTK+ 3 - Tutorial 14 - Menus

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

I liked that they had the menus up top like that. It was good for netbooks.

christopherhorn
Автор

The signal from selecting a menu item is: "activate". So you can connect it to a menu item in the tutorial like this:
file_exit.connect("activate", self.handle_menu_exit)

And the function to handle that click:

def handle_menu_exit(self, data):
print "Good bye cruel world!"
Gtk.main_quit()

TonyFreeman
Автор

This is nice informative video tutorial in Python GUI Development

websachi
Автор

You still make videos? Shit. I remember you from 5 years ago.

harryrigg
Автор

you should try ubuntu mate or Linux mint

MarcelRobitaille
Автор

I wish there were still tutorials for GTK in python. Everywhere I look the API is incomplete and expressed in C without explaining what any of the parameters are.

daniellewis
Автор

my main menu is not displaying in the top it is showing in middle

flow
Автор

I go to 10 different YouTube downloading sites for downloading this video.
All other videos just downloaded by single sit but why this video keeps failure I don't know

GamingZoneOfficialChannel
Автор

Whatever happened to your game series for java?

skylerknecht
Автор

thanks for your vedios and tuts i really got a good programming information by watching ur chennel .. and i recommend you to make tut for powerpc ( ppc ) it will be ok and i was looking for a good tuts but can't find, so make it and it will support ur chennel .. thanks again

imwaleed
Автор

My thoughts exactly about those Ubuntu menus! :q They have my vote for the dumbest UI design of the decade.
Not only it slows you down (because you can't target your mouse toward a particular menu item – you have to position your mouse over the title bar _first_ and then wait until the menu appears), but also makes it harder to move windows around by holding them by their title bars. The disconectedness of the menu bar from the application it belongs to is whole another level of broken usability. I think the only thing they could do to make it even less usable is to randomly jitter/repositoon those menu items whenever you try to click them ;q (but maybe let's not give them ideas... :s ).

bonbonpony
Автор

This works for me


from gi.repository import Gtk


class MenuWindow(Gtk.Window):


def __init__(self):
Gtk.Window.__init__(self, title="")

self.set_border_width(10)
self.set_default_size(500, 400)


header_bar = Gtk.HeaderBar()

header_bar.props.title = "Rippin Music Player"
self.set_titlebar(header_bar)
box =


main_menu_bar = Gtk.MenuBar()
box.add(main_menu_bar)


# Drop down menu
file_menu = Gtk.Menu()
file_menu_dropdown = Gtk.MenuItem("File")


file_new = Gtk.MenuItem("New")
file_open = Gtk.MenuItem("Open")
file_exit = Gtk.MenuItem("Exit")





file_menu.append(file_new)
file_menu.append(file_open)

file_menu.append(file_exit)



header_bar.pack_start(box)


window = MenuWindow()
window.connect("delete-event", Gtk.main_quit)
window.show_all()
Gtk.main()

ayushnagar
Автор

Nice tutorial bro well i from spain but i undestand u, can u do a tutorial to ollydbg or cracking? Thanks you :)

oskkim
Автор

can you change the background color to light grey coz black make difficult to see.

TariqSajid
Автор

Nice series, thanks a lot ; Hey would you know how to pop open this menu (or any Gtk menu) on right click? I get the signal "button-3" from the eventBox, but menu.show() does nothing, do you know what I am missing?

yPhil
Автор

Hi, Pliz do a cover on JavaFX Db connections.

bensonkisinja
Автор

Could someone please tell me a good IDE to use for Java or maybe even pass me a link? Much appreciated!

zzshake
visit shbcf.ru