Skip to Content
深入淺出程式設計
book

深入淺出程式設計

by David Griffiths, Paul Barry
August 2011
Intermediate to advanced
444 pages
8h 55m
Chinese
GoTop Information, Inc.
Content preview from 深入淺出程式設計
目前位置 4 245
建立圖型化操作介面
測試版
GUI 程式 I D L E F 5
得更好︰
不只看起來不錯,
聽起來也很舒服。
每當你點擊按鈕,就會聽到適當的音效。幹得好﹗
那麼,在
tkinter
裡的「事件處理器」(
event
handler
)只是函式?
:是的,如本章稍早所述︰全都是程式碼,並且
透過將想要執行的程式碼放進函式 ,很容易就能夠
使用與每個按鈕相關聯的
co mmand
參數來參照它。
你的使用者點擊按鈕,以便執行函式裡的程式碼。
這實際上並不會太難,我總以為建造
GUI
只是
進階程式人員的事!?
:嗯
...
過去確實如此,但事情已經不同於以往了
(
變得更好
)
。像
tkinter
這樣的技術讓每個程式人員不
需煩惱太多瑣事就能夠建造出好看的
GUI
程式,如此
一來,
tkinter
負責把
GUI
的相關工作搞定,而你就可
以專注於需要的程式邏輯。
假如我想要為我的
GUI
程式添加其他東西,也
是類似的做法嗎?
:是的,你需要做的就是撰寫程式碼。
我可以使用像是對按鈕有效之
command
參數之
類的東西,將我的程式碼連結到其他東西上嗎?
(或小組件)的機制可能會有點兒不同,但概念都一
樣。一旦
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Kubernetes设计模式

Kubernetes设计模式

Bilgin Ibryam, Roland Huß
深入淺出代數

深入淺出代數

Tracey Pilone, Dan Pilone
Kafka权威指南(第2版)

Kafka权威指南(第2版)

Gwen Shapira, Todd Palino, Rajini Sivaram, Krit Petty

Publisher Resources

ISBN: 9789862762691