PyGobject(十六)布局容器之Button篇——Gtk.VolumeButton

来源:互联网 发布:长沙大数据招聘 编辑:程序博客网 时间:2024/05/17 20:24

  • GtkVolumeButton
    • 继承关系
    • Methods
    • Virtual Methods
    • Properties
    • Signals
    • 例子

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 017TITLE = "VolumeButton"DESCRIPTION = """Gtk.VolumeButton is a subclass of Gtk.ScaleButton that has been tailored foruse as a volume control widget with suitable icons, tooltips and accessible labels."""import gigi.require_version('Gtk', '3.0')from gi.repository import Gtk, Gdkclass 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.csdn.net/detail/a87b01c14/9594728

0 0
原创粉丝点击