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

Method heading

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

Query or modify the heading options for the specified column. If kw is not given, returns a dict of the heading option values. If option is specified then the value for that option is returned. Otherwise, sets the options to the corresponding values. Valid opt

(self, column, option=None, **kw)

Source from the content-addressed store, hash-verified

1243
1244
1245 def heading(self, column, option=None, **kw):
1246 """Query or modify the heading options for the specified column.
1247
1248 If kw is not given, returns a dict of the heading option values. If
1249 option is specified then the value for that option is returned.
1250 Otherwise, sets the options to the corresponding values.
1251
1252 Valid options/values are:
1253 text: text
1254 The text to display in the column heading
1255 image: image_name
1256 Specifies an image to display to the right of the column
1257 heading
1258 anchor: anchor
1259 Specifies how the heading text should be aligned. One of
1260 the standard Tk anchor values
1261 command: callback
1262 A callback to be invoked when the heading label is
1263 pressed.
1264
1265 To configure the tree column heading, call this with column = "#0" """
1266 cmd = kw.get('command')
1267 if cmd and not isinstance(cmd, str):
1268 # callback not registered yet, do it now
1269 kw['command'] = self.master.register(cmd, self._substitute)
1270
1271 if option is not None:
1272 kw[option] = None
1273
1274 return _val_or_dict(self.tk, kw, self._w, 'heading', column)
1275
1276
1277 def identify(self, component, x, y):

Callers 5

test_headingMethod · 0.45
test_heading_callbackMethod · 0.45
docserverMethod · 0.45
tripieceMethod · 0.45
pentpieceMethod · 0.45

Calls 3

_val_or_dictFunction · 0.85
getMethod · 0.45
registerMethod · 0.45

Tested by 2

test_headingMethod · 0.36
test_heading_callbackMethod · 0.36