Differences between revisions 31 and 32
Revision 31 as of 2006-05-24 16:38:58
Size: 3203
Editor: yongshunz
Comment:
Revision 32 as of 2009-12-25 07:16:38
Size: 3139
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
[[TableOfContents]] <<TableOfContents>>
Line 18: Line 18:
'''[wiki:self/pygtk_into 绪论]''' '''[[self:pygtk_into|绪论]]'''
Line 26: Line 26:
'''[wiki:self/pygtk_getstart Getting Started]''' '''[[self:pygtk_getstart|Getting Started]]'''
Line 30: Line 30:
'''[wiki:self/pygtk_sayhello 用PyGTK说“Hello”]''' '''[[self:pygtk_sayhello|用PyGTK说“Hello”]]'''
Line 34: Line 34:
'''[wiki:self/pygtk_callback 事件信号 和 函数调用的理论]''' '''[[self:pygtk_callback|事件信号 和 函数调用的理论]]'''
Line 38: Line 38:
'''[wiki:self/pygtk_events 五花八门的事件]''' '''[[self:pygtk_events|五花八门的事件]]'''
Line 42: Line 42:
'''[wiki:self/pygtk_sthello hello world庖丁解牛]''' '''[[self:pygtk_sthello|hello world庖丁解牛]]'''
Line 51: Line 51:
'''[wiki:self/pygtk_movingon COME ON!! 继续前进吧]''' '''[[self:pygtk_movingon|COME ON!! 继续前进吧]]'''
Line 61: Line 61:
'''[wiki:self/pygtk_box 魔力box]''' '''[[self:pygtk_box|魔力box]]'''
Line 65: Line 65:
'''[wiki:self/pygtk_openbox 打开box]''' '''[[self:pygtk_openbox|打开box]]'''
Line 69: Line 69:
'''[wiki:self/pygtk_demo 小试牛刀]''' '''[[self:pygtk_demo|小试牛刀]]'''
Line 73: Line 73:
'''[wiki:self/pygtk_packtable 表格方式排版]''' '''[[self:pygtk_packtable|表格方式排版]]'''
Line 77: Line 77:
'''[wiki:self/pygtk_tabledemo 表格排版示例]''' '''[[self:pygtk_tabledemo|表格排版示例]]'''
Line 91: Line 91:
'''[wiki:self/pygtk_widgetshi Widget们的类型层次结构]''' '''[[self:pygtk_widgetshi|Widget们的类型层次结构]]'''
Line 95: Line 95:
'''[wiki:self/pygtk_withoutwindows 在离开窗口的日子里]''' '''[[self:pygtk_withoutwindows|在离开窗口的日子里]]'''
Line 101: Line 101:
'''[wiki:self/pygtk_buttons 普通货色]''' '''[[self:pygtk_buttons|普通货色]]'''
Line 105: Line 105:
'''[wiki:self/pygtk_togglebuttons Toggle Buttons]''' '''[[self:pygtk_togglebuttons|Toggle Buttons]]'''
Line 109: Line 109:
'''[wiki:self/pygtk_checkbuttons  Check Buttons]''' '''[[self:pygtk_checkbuttons|Check Buttons]]'''
Line 113: Line 113:
'''[wiki:self/pygtk_radiobuttons Radio Buttons]''' '''[[self:pygtk_radiobuttons|Radio Buttons]]'''
Line 119: Line 119:
'''[wiki:self/pygtk_creatingadj 左顾右盼、瞻前顾后]''' '''[[self:pygtk_creatingadj|左顾右盼、瞻前顾后]]'''
Line 123: Line 123:
'''[wiki:self/pygtk_usingadj 画地为牢]''' '''[[self:pygtk_usingadj|画地为牢]]'''
Line 127: Line 127:
'''[wiki:self/pygtk_internals 深入讲解]''' '''[[self:pygtk_internals|深入讲解]]'''

1. PyGTK 2.0 Tutorial 中文编译

原作者:John Finlay

Version 2.4

April 13, 2005

1.1. 绪论

绪论

1.1.1. 浅析PyGTK

这段没什么意思,就不麻烦了

1.2. Getting Started

Getting Started

1.2.1. 用PyGTK说“Hello”

用PyGTK说“Hello”

1.2.2. 事件信号 和 函数调用的理论

事件信号 和 函数调用的理论

1.2.3. Events

五花八门的事件

1.2.4. Stepping Through Hello World

hello world庖丁解牛

1.3. COME ON!! 继续前进吧

1.3.1. 对“信号处理”了解更多

1.3.2. Hello World的火力加强版

COME ON!! 继续前进吧

1.4. 对widget进行排版

一个GUI程序的主窗口一般是不只一二个widget的,我们的第一个程序只有一个widget,所以我们简单地使用了gtk.Container.add()来把widget放进主窗口。那么,当我们要同时在主窗口中组织多个widget时,我们怎么来处理widget之间以及widget和主窗口之间的位置关系呢??????????

这就是我们学习packing的理由了。

1.4.1. 魔力box

魔力box

1.4.2. 打开box

打开box

1.4.3. 小试牛刀

小试牛刀

1.4.4. 表格方式排版

表格方式排版

1.4.5. 表格排版示例

表格排版示例

1.5. widget初步领略

使用widget的一般步骤是:

  • 调用widget的构造函数:gtk.*
  • 为widget定义好各种事件处理
  • 定义widget的各种属性
  • 用适当的方法把widget放入某一个容器中:gtk.Container.add()或是gtk.Box.pack_start()。
  • 显示widget:gtk.Widget.show()

1.5.1. Widget们的类型层次结构

Widget们的类型层次结构

1.5.2. 在离开窗口的日子里

在离开窗口的日子里

1.6. 按一下按钮

1.6.1. 普通货色

普通货色

1.6.2. Toggle Buttons

Toggle Buttons

1.6.3. Check Buttons

Check Buttons

1.6.4. Radio Buttons

Radio Buttons

1.7. 找准自己的位置

1.7.1. 左顾右盼、瞻前顾后

左顾右盼、瞻前顾后

1.7.2. 画地为牢

画地为牢

1.7.3. 深入讲解

深入讲解

1.8. 只能看见一部分^o^

1.9. widget大杂烩

1.10. 可以装别的widget的widget

1.11. 来份菜单

1.12. 我要涂鸦

1.13. 1+1在什么情况下不等于2

PyGTK2_Tutorial_cn (last edited 2009-12-25 07:16:38 by localhost)