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

Method create_other_buttons

Lib/idlelib/searchbase.py:155–167  ·  view source on GitHub ↗

Return (frame, others) for testing. Others is a list of value, label pairs. A gridded frame from make_frame is filled with radio buttons.

(self)

Source from the content-addressed store, hash-verified

153 return frame, options
154
155 def create_other_buttons(self):
156 '''Return (frame, others) for testing.
157
158 Others is a list of value, label pairs.
159 A gridded frame from make_frame is filled with radio buttons.
160 '''
161 frame = self.make_frame("Direction")[0]
162 var = self.engine.backvar
163 others = [(1, 'Up'), (0, 'Down')]
164 for val, label in others:
165 btn = Radiobutton(frame, variable=var, value=val, text=label)
166 btn.pack(side="left", fill="both")
167 return frame, others
168
169 def make_button(self, label, command, isdef=0):
170 "Return command button gridded in command frame."

Callers 1

create_widgetsMethod · 0.95

Calls 3

make_frameMethod · 0.95
RadiobuttonClass · 0.90
packMethod · 0.45

Tested by

no test coverage detected