def create_combo_entry(self, top_attach, bottom_attach, label_content, hotkey_content):    
     combo_hbox = gtk.HBox(spacing=5)
     combo_hbox.pack_start(create_right_align(), True, True)
     
     # single_hotkey_label
     hotkey_label = Label(label_content)
     combo_hbox.pack_start(hotkey_label, False, False)
     
     # Hotkey entry.
     hotkey_entry = ShortcutKeyEntry(hotkey_content)
     hotkey_entry.set_size(170, 24)
     hotkey_entry_align = gtk.Alignment()
     hotkey_entry_align.set_padding(0, 0, 0, 50)
     hotkey_entry_align.add(hotkey_entry)
     combo_hbox.pack_start(hotkey_entry_align, False, False)
     
     self.main_table.attach(combo_hbox, 0, 2, top_attach, bottom_attach, xpadding=5)
     # self.main_table.attach(combo_hbox, 0, 1, top_attach, bottom_attach, xpadding=5)
     # self.main_table.attach(hotkey_entry, 1, 2, top_attach, bottom_attach, xoptions=gtk.FILL)
     
     return hotkey_entry
Exemple #2
0
    volume_frame = gtk.Alignment()
    volume_frame.set(0.0, 0.5, 0, 0)
    volume_frame.set_padding(0, 0, 10, 0)
    volume_frame.add(volume_button)
    tab_1_box.pack_start(volume_frame, False, False)

    # Add entry widget.
    entry_box = gtk.HBox(spacing=10)

    text_entry = dtk.ui.entry.TextEntry()

    text_entry.set_size(100, 22)
    input_entry = InputEntry()
    input_entry.entry.place_holder = "哈哈中"
    input_entry.set_size(100, 22)
    shortcust_entry = ShortcutKeyEntry()
    shortcust_entry.set_size(100, 22)
    password_entry = PasswordEntry()
    password_entry.set_size(100, 22)

    combo_box = ComboBox([("测试测试测试%d" % i, i) for i in range(10)],
                         fixed_width=100)

    spin_box = SpinBox(3000, 0, 5000, 100)

    # mac_entry = MACEntry()
    mac_entry = IPV4Entry()
    mac_entry.connect("changed", print_address)
    # mac_entry = IPV4Entry()
    # mac_entry.set_ip("255.255.255.andy")
    # mac_entry.set_ip("192.168..12")
Exemple #3
0
     app_theme.get_pixbuf("entry/search_normal.png"),
     app_theme.get_pixbuf("entry/search_hover.png"),
     app_theme.get_pixbuf("entry/search_press.png"),
     )
 # entry = TextEntry("Linux Deepin")
 entry = InputEntry("Linux Deepin")
 entry.connect("action-active", print_entry_action)
 entry.set_size(150, 24)
 entry_label = Label("标签测试, 内容非常长")
 entry_label.set_text("标签的内容")
 entry_label.set_size_request(100, 30)
 entry_box = gtk.HBox(spacing=10)
 entry_box.pack_start(entry_label, False, False)
 entry_box.pack_start(entry, True, True)
 
 shortcust_entry = ShortcutKeyEntry("Ctrl + Alt + Q")
 shortcust_entry.set_size(150, 24)
 entry_box.pack_start(shortcust_entry, False, False)
 
 test_button = Button("测试")
 test_button.connect("clicked", clicked_test)
 entry_box.pack_start(test_button, False, False)
 
 color_button = ColorButton()
 entry_box.pack_start(color_button, False, False)
 
 # combobox
 combo_box = ComboBox(
     [("测试测试测试1", 1),
      ("测试测试测试2", 2),
      ("测试测试测试3", 3),
Exemple #4
0
    volume_frame = gtk.Alignment()
    volume_frame.set(0.0, 0.5, 0, 0)
    volume_frame.set_padding(0, 0, 10, 0)
    volume_frame.add(volume_button)
    tab_1_box.pack_start(volume_frame, False, False)
    
    # Add entry widget.
    entry_box = gtk.HBox(spacing=10)
    
    text_entry = dtk.ui.entry.TextEntry()

    text_entry.set_size(100, 22)
    input_entry = InputEntry()
    input_entry.entry.place_holder = "哈哈中"    
    input_entry.set_size(100, 22)
    shortcust_entry = ShortcutKeyEntry()
    shortcust_entry.set_size(100, 22)
    password_entry = PasswordEntry()
    password_entry.set_size(100, 22)
    
    combo_box = ComboBox([("测试测试测试%d" % i, i)  for i in range(10)], fixed_width=100)
    
    spin_box = SpinBox(3000, 0, 5000, 100)
    
    # mac_entry = MACEntry()
    mac_entry = IPV4Entry()
    mac_entry.connect("changed", print_address)
    # mac_entry = IPV4Entry()
    # mac_entry.set_ip("255.255.255.andy")
    # mac_entry.set_ip("192.168..12")
    # mac_entry.set_ip("192.168..12")