MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / drawicon

Method drawicon

tools/python-3.11.9-amd64/Lib/idlelib/tree.py:242–253  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

240 return cy
241
242 def drawicon(self):
243 if self.selected:
244 imagename = (self.item.GetSelectedIconName() or
245 self.item.GetIconName() or
246 "openfolder")
247 else:
248 imagename = self.item.GetIconName() or "folder"
249 image = self.geticonimage(imagename)
250 id = self.canvas.create_image(self.x, self.y, anchor="nw", image=image)
251 self.image_id = id
252 self.canvas.tag_bind(id, "<1>", self.select)
253 self.canvas.tag_bind(id, "<Double-1>", self.flip)
254
255 def drawtext(self):
256 textx = self.x+20-1

Callers 3

selectMethod · 0.95
deselectMethod · 0.95
drawMethod · 0.95

Calls 5

geticonimageMethod · 0.95
GetSelectedIconNameMethod · 0.80
create_imageMethod · 0.80
GetIconNameMethod · 0.45
tag_bindMethod · 0.45

Tested by

no test coverage detected