blob: e50c9071e59f356912820ff835d9f43a2dd91ed0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# -*- coding: utf-8 -*-
#
# a dialog box with a local grab (called by 'widget')
#
class TkDialog_Demo1 < TkDialog
###############
private
###############
def title
"Dialog with local grab"
end
def message
'ã¢ã¼ãã«ãã¤ã¢ãã°ããã¯ã¹ã§ããTk ã® "grab" ã³ãã³ãã使ç¨ãã¦ãã¤ã¢ãã°ããã¯ã¹ã§ããã¼ã«ã«ã°ã©ãããã¦ãã¾ããä¸ã®ããããã®ãã¿ã³ãå®è¡ãããã¨ã«ãã£ã¦ããã®ãã¤ã¢ãã°ã«çããã¾ã§ããã®ã°ã©ãã«ãã£ã¦ã¢ããªã±ã¼ã·ã§ã³ã®ä»ã®ã¦ã£ã³ãã¦ã§ã¯ããã¤ã³ã¿é¢ä¿ã®ã¤ãã³ããåãåããã¨ãã§ããªããªã£ã¦ãã¾ãã'
end
def bitmap
'info'
end
def default_button
0
end
def buttons
# "äºè§£ ãã£ã³ã»ã« ã³ã¼ãåç
§"
["äºè§£", "ãã£ã³ã»ã«", "ã³ã¼ãåç
§"]
end
end
ret = TkDialog_Demo1.new('message_config'=>{'wraplength'=>'4i'}).value
case ret
when 0
print "ããªãã¯ãäºè§£ããæ¼ãã¾ãããã\n"
when 1
print "ããªãã¯ããã£ã³ã»ã«ããæ¼ãã¾ãããã\n"
when 2
showCode 'dialog1'
end
|