MCPcopy Index your code
hub / github.com/python/cpython / make_button

Method make_button

Lib/idlelib/searchbase.py:169–177  ·  view source on GitHub ↗

Return command button gridded in command frame.

(self, label, command, isdef=0)

Source from the content-addressed store, hash-verified

167 return frame, others
168
169 def make_button(self, label, command, isdef=0):
170 "Return command button gridded in command frame."
171 b = Button(self.buttonframe,
172 text=label, command=command,
173 default=isdef and "active" or "normal")
174 cols,rows=self.buttonframe.grid_size()
175 b.grid(pady=1,row=rows,column=0,sticky="ew")
176 self.buttonframe.grid(rowspan=rows+1)
177 return b
178
179 def create_command_buttons(self):
180 "Place buttons in vertical command frame gridded on right."

Callers 5

create_widgetsMethod · 0.80
test_make_buttonMethod · 0.80

Calls 3

ButtonClass · 0.90
grid_sizeMethod · 0.80
gridMethod · 0.45

Tested by 1

test_make_buttonMethod · 0.64