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

Method makeTextFrame

Lib/turtledemo/__main__.py:210–236  ·  view source on GitHub ↗
(self, root)

Source from the content-addressed store, hash-verified

208 self.canvas.yview_moveto(0.5*(self.canvheight-cheight)/self.canvheight)
209
210 def makeTextFrame(self, root):
211 self.text_frame = text_frame = Frame(root)
212 self.text = text = Text(text_frame, name='text', padx=5,
213 wrap='none', width=45)
214 color_config(text)
215
216 self.vbar = vbar = Scrollbar(text_frame, name='vbar')
217 vbar['command'] = text.yview
218 vbar.pack(side=RIGHT, fill=Y)
219 self.hbar = hbar = Scrollbar(text_frame, name='hbar', orient=HORIZONTAL)
220 hbar['command'] = text.xview
221 hbar.pack(side=BOTTOM, fill=X)
222 text['yscrollcommand'] = vbar.set
223 text['xscrollcommand'] = hbar.set
224
225 text['font'] = tuple(txtfont)
226 shortcut = 'Command' if darwin else 'Control'
227 text.bind_all('<%s-minus>' % shortcut, self.decrease_size)
228 text.bind_all('<%s-underscore>' % shortcut, self.decrease_size)
229 text.bind_all('<%s-equal>' % shortcut, self.increase_size)
230 text.bind_all('<%s-plus>' % shortcut, self.increase_size)
231 text.bind('<Control-MouseWheel>', self.update_mousewheel)
232 text.bind('<Control-Button-4>', self.increase_size)
233 text.bind('<Control-Button-5>', self.decrease_size)
234
235 text.pack(side=LEFT, fill=BOTH, expand=1)
236 return text_frame
237
238 def makeGraphFrame(self, root):
239 # t._Screen is a singleton class instantiated or retrieved

Callers 1

__init__Method · 0.95

Calls 7

bindMethod · 0.95
color_configFunction · 0.90
bind_allMethod · 0.80
FrameClass · 0.50
TextClass · 0.50
ScrollbarClass · 0.50
packMethod · 0.45

Tested by

no test coverage detected