GTK プログラミング!!at LINUX
GTK プログラミング!! - 暇つぶし2ch589:login:Penguin
04/11/09 07:50:30 t6yHsCJv
>>586
ごめん、ボタンラベルではなくだだのラベルを書き換えだね。
それから、pygtkで済まん。
#!/usr/bin/env python

import pygtk; pygtk.require('2.0')
import gtk, gobject

count = 0
def deal_timeout(label):
  global count
  count += 1
  label.set_text(str(count))
  if count < 10:
    return True
  else:
    return False

label = gtk.Label(str(count))

window = gtk.Window()
window.connect('destroy', lambda w: gtk.main_quit())
window.set_border_width(10)
window.add(label)
window.show_all()

#timer = gtk.timeout_add(1000, deal_timeout, label)
timer = gobject.timeout_add(1000, deal_timeout, label)

gtk.main()



次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch