Gtk.VolumeButton
继承关系
Gtk.VolumeButton声音大小调节按钮。Gtk.VolumeButton是Gtk.ScaleButton的直接子类
Methods
方法修饰词 | 方法名及参数 |
---|---|
static | new () |
Virtual Methods
Properties
Name | Type | Flags | Short Description |
---|---|---|---|
use-symbolic | bool | r/w/c/en | Whether to use symbolic icons |
Signals
Name | Short Description |
---|
例子
代码:
#!/usr/bin/env python3
# Created by xiaosanyu at 16/6/27
# section 017
TITLE = "VolumeButton"
DESCRIPTION = """
Gtk.VolumeButton is a subclass of Gtk.ScaleButton that has been tailored for
use as a volume control widget with suitable icons, tooltips and accessible labels.
"""
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk
class VolumeButtonWindow(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self, title="VolumeButton Demo")
self.set_border_width(10)
self.set_default_size(200, 300)
box = Gtk.Box()
vbtn = Gtk.VolumeButton()
box.add(vbtn)
self.add(box)
def main():
win = VolumeButtonWindow()
win.connect("delete-event", Gtk.main_quit)
win.show_all()
Gtk.main()
if __name__ == "__main__":
main()
使用比较简单。不做详解
代码下载地址:http://download.youkuaiyun.com/detail/a87b01c14/9594728