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

Method create_option_buttons

Lib/idlelib/searchbase.py:136–153  ·  view source on GitHub ↗

Return (filled frame, options) for testing. Options is a list of searchengine booleanvar, label pairs. A gridded frame from make_frame is filled with a Checkbutton for each pair, bound to the var, with the corresponding label.

(self)

Source from the content-addressed store, hash-verified

134 return frame, label
135
136 def create_option_buttons(self):
137 '''Return (filled frame, options) for testing.
138
139 Options is a list of searchengine booleanvar, label pairs.
140 A gridded frame from make_frame is filled with a Checkbutton
141 for each pair, bound to the var, with the corresponding label.
142 '''
143 frame = self.make_frame("Options")[0]
144 engine = self.engine
145 options = [(engine.revar, "Regular expression"),
146 (engine.casevar, "Match case"),
147 (engine.wordvar, "Whole word")]
148 if self.needwrapbutton:
149 options.append((engine.wrapvar, "Wrap around"))
150 for var, label in options:
151 btn = Checkbutton(frame, variable=var, text=label)
152 btn.pack(side="left", fill="both")
153 return frame, options
154
155 def create_other_buttons(self):
156 '''Return (frame, others) for testing.

Callers 1

create_widgetsMethod · 0.95

Calls 4

make_frameMethod · 0.95
CheckbuttonClass · 0.90
appendMethod · 0.45
packMethod · 0.45

Tested by

no test coverage detected