10000 [3.12] gh-110746: Improve markup in ``tkinter.ttk.rst`` (GH-111236) by miss-islington · Pull Request #113193 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.12] gh-110746: Improve markup in tkinter.ttk.rst (GH-111236) #113193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions Doc/library/tkinter.ttk.rst
Original file line number Diff line number Diff line change
Expand Up @@ -986,19 +986,19 @@ ttk.Treeview

The valid options/values are:

id
*id*
Returns the column name. This is a read-only option.
anchor: One of the standard Tk anchor values.
*anchor*: One of the standard Tk anchor values.
Specifies how the text in this column should be aligned with respect
to the cell.
minwidth: width
*minwidth*: width
The minimum width of the column in pixels. The treeview widget will
not make the column any smaller than specified by this option when
the widget is resized or the user drags a column.
stretch: ``True``/``False``
*stretch*: ``True``/``False``
Specifies whether the column's width should be adjusted when
the widget is resized.
width: width
*width*: width
The width of the column in pixels.

To configure the tree column, call this with column = "#0"
Expand Down Expand Up @@ -1041,14 +1041,14 @@ ttk.Treeview

The valid options/values are:

text: text
*text*: text
The text to display in the column heading.
image: imageName
*image*: imageName
Specifies an image to display to the right of the column heading.
anchor: anchor
*anchor*: anchor
Specifies how the heading text should be aligned. One of the standard
Tk anchor values.
command: callback
*command*: callback
A callback to be invoked when the heading label is pressed.

To configure the tree column heading, call this with column = "#0".
Expand Down Expand Up @@ -1515,23 +1515,24 @@ Layouts
A layout can be just ``None``, if it takes no options, or a dict of
options specifying how to arrange the element. The layout mechanism
uses a simplified version of the pack geometry manager: given an
initial cavity, each element is allocated a parcel. Valid
options/values are:
initial cavity, each element is allocated a parcel.

side: whichside
The valid options/values are:

*side*: whichside
Specifies which side of the cavity to place the element; one of
top, right, bottom or left. If omitted, the element occupies the
entire cavity.

sticky: nswe
*sticky*: nswe
Specifies where the element is placed inside its allocated parcel.

unit: 0 or 1
*unit*: 0 or 1
If set to 1, causes the element and all of its descendants to be treated as
a single element for the purposes of :meth:`Widget.identify` et al. It's
used for things like scrollbar thumbs with grips.

children: [sublayout... ]
*children*: [sublayout... ]
Specifies a list of elements to place inside the element. Each
element is a tuple (or other sequence type) where the first item i 7DF2 s
the layout name, and the other is a `Layout`_.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improved markup for valid options/values for methods ttk.treeview.column and ttk.treeview.heading, and for Layouts.
0