1
1
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
2
- #
2
+ #
3
3
# $Id$
4
4
#
5
5
# Tix Demostration Program
@@ -27,25 +27,25 @@ def RunSample(w):
27
27
# to invent new months?
28
28
#
29
29
# [Hint] The -options switch sets the options of the subwidgets.
30
- # [Hint] We set the label.width subwidget option of both comboboxes to
30
+ # [Hint] We set the label.width subwidget option of both comboboxes to
31
31
# be 10 so that their labels appear to be aligned.
32
32
#
33
33
a = Tix .ComboBox (top , label = "Month: " , dropdown = 1 ,
34
- command = select_month , editable = 0 , variable = demo_month ,
35
- options = 'listbox.height 6 label.width 10 label.anchor e' )
34
+ command = select_month , editable = 0 , variable = demo_month ,
35
+ options = 'listbox.height 6 label.width 10 label.anchor e' )
36
36
37
37
# $w.top.b is a non-drop-down combo box. It is not editable: we provide
38
38
# four choices for the user, but he can enter an alternative year if he
39
39
# wants to.
40
40
#
41
41
# [Hint] Use the padY and anchor options of the label subwidget to
42
- # align the label with the entry subwidget.
42
+ # align the label with the entry subwidget.
43
43
# [Hint] Notice that you should use padY (the NAME of the option) and not
44
44
# pady (the SWITCH of the option).
45
45
#
46
46
b = Tix .ComboBox (top , label = "Year: " , dropdown = 0 ,
47
- command = select_year , editable = 1 , variable = demo_year ,
48
- options = 'listbox.height 4 label.padY 5 label.width 10 label.anchor ne' )
47
+ command = select_year , editable = 1 , variable = demo_year ,
48
+ options = 'listbox.height 4 label.padY 5 label.width 10 label.anchor ne' )
49
49
50
50
a .pack (side = Tix .TOP , anchor = Tix .W )
51
51
b .pack (side = Tix .TOP , anchor = Tix .W )
@@ -70,17 +70,17 @@ def RunSample(w):
70
70
b .insert (Tix .END , '1996' )
71
71
72
72
# Use "tixSetSilent" to set the values of the combo box if you
73
- # don't want your -command procedures (cbx:select_month and
73
+ # don't want your -command procedures (cbx:select_month and
74
74
# cbx:select_year) to be called.
75
75
#
76
76
a .set_silent ('January' )
77
77
b .set_silent ('1995' )
78
78
79
79
box = Tix .ButtonBox (w , orientation = Tix .HORIZONTAL )
80
80
box .add ('ok' , text = 'Ok' , underline = 0 , width = 6 ,
81
- command = lambda w = w : ok_command (w ))
81
+ command = lambda w = w : ok_command (w ))
82
82
box .add ('cancel' , text = 'Cancel' , underline = 0 , width = 6 ,
83
- command = lambda w = w : w .destroy ())
83
+ command = lambda w = w : w .destroy ())
84
84
box .pack (side = Tix .BOTTOM , fill = Tix .X )
85
85
top .pack (side = Tix .TOP , fill = Tix .BOTH , expand = 1 )
86
86
0 commit comments