File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -15,19 +15,21 @@ class CalculatorButtons:
1515 def __init__ (self , calculator : calc .Calculator ):
1616 self .calculator = calculator
1717 self .frame = None
18+ self .buttons = []
1819
1920 def create_gui (self , root , layout = LAYOUT_STANDARD , width = 4 ):
2021 self .frame = tk .Frame (root )
2122
2223 for i , label in enumerate (layout ):
2324 button = calc_button (self .frame , self .calculator , label )
2425 button .grid (column = i % width , row = int (i / width ), sticky = tk .NSEW )
26+ self .buttons .append (button )
2527
2628 for i in range (width ):
2729 self .frame .grid_columnconfigure (i , uniform = "calc_buttons" , weight = 1 )
2830
2931 for i in range (int (len (layout )/ width )):
3032 self .frame .grid_rowconfigure (i , weight = 1 )
31-
33+
3234 def update (self ):
3335 pass
You can’t perform that action at this time.
0 commit comments