您的位置:首页 > 移动开发 > Objective-C

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

2016-07-26 15:45 447 查看
GtkVolumeButton
继承关系

Methods

Virtual Methods

Properties

Signals

例子

Gtk.VolumeButton

继承关系

Gtk.VolumeButton声音大小调节按钮。Gtk.VolumeButton是Gtk.ScaleButton的直接子类



Methods

方法修饰词方法名及参数
staticnew ()

Virtual Methods

Properties

NameTypeFlagsShort Description
use-symbolicboolr/w/c/enWhether to use symbolic icons

Signals

NameShort 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.csdn.net/detail/a87b01c14/9594728
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息