Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from gi.repository import Gtk as gtk
- from gi.repository import Gdk as gdk
- class app:
- def __init__(self):
- window_main = gtk.Window()
- window_main.set_size_request(gdk.Screen.get_default().get_width(),0)
- window_main.set_name("window_main")
- window_main.move(0,0)
- window_main.set_keep_above(True)
- window_main.set_resizable(False)
- window_main.set_decorated(False)
- window_main.set_border_width(0)
- window_main.connect("destroy",lambda e: gtk.main_quit())
- #create widgets for "categories place"#
- box_main = gtk.HBox()
- scrolledwindow_categories = gtk.ScrolledWindow()
- scrolledwindow_categories.set_policy(
- gtk.PolicyType.AUTOMATIC,
- gtk.PolicyType.NEVER
- )
- scrolledwindow_categories.set_size_request(20,20)
- viewport_categories = gtk.Viewport()
- viewport_categories.add(box_main)
- scrolledwindow_categories.add(viewport_categories)
- window_main.add(scrolledwindow_categories)
- notebook_categories = gtk.Notebook()
- box_main.add(notebook_categories)
- for i in range(20):
- button = gtk.Button("Button")
- notebook_categories.append_page(button,gtk.Label("Text"))
- window_main.show_all()
- gtk.main()
- app()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement