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

Method insert

tools/python-3.11.9-amd64/Lib/tkinter/ttk.py:1321–1341  ·  view source on GitHub ↗

Creates a new item and return the item identifier of the newly created item. parent is the item ID of the parent item, or the empty string to create a new top-level item. index is an integer, or the value end, specifying where in the list of parent's children to

(self, parent, index, iid=None, **kw)

Source from the content-addressed store, hash-verified

1319
1320
1321 def insert(self, parent, index, iid=None, **kw):
1322 """Creates a new item and return the item identifier of the newly
1323 created item.
1324
1325 parent is the item ID of the parent item, or the empty string
1326 to create a new top-level item. index is an integer, or the value
1327 end, specifying where in the list of parent's children to insert
1328 the new item. If index is less than or equal to zero, the new node
1329 is inserted at the beginning, if index is greater than or equal to
1330 the current number of children, it is inserted at the end. If iid
1331 is specified, it is used as the item identifier, iid must not
1332 already exist in the tree. Otherwise, a new unique identifier
1333 is generated."""
1334 opts = _format_optdict(kw)
1335 if iid is not None:
1336 res = self.tk.call(self._w, "insert", parent, index,
1337 "-id", iid, *opts)
1338 else:
1339 res = self.tk.call(self._w, "insert", parent, index, *opts)
1340
1341 return res
1342
1343
1344 def item(self, item, option=None, **kw):

Callers

nothing calls this directly

Calls 2

_format_optdictFunction · 0.85
callMethod · 0.80

Tested by

no test coverage detected