Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

tkinter documentation: font data type error and two minor suggestions #99089

Copy link
Copy link

Description

@Magnymbus
Issue body actions

Packer Options

Anchor:

Very minor gripe that this does not include the legal values while the other parameters do.
I recommend appending the following sentence for clarity:

Legal values are points of the compass: "n", "ne", "e", "se", "s", "sw", "w", "nw", and also "center".

Tk Option Data Types

Font:

Tk uses a list font name format, such as {courier 10 bold}.

The example provided does not function, as it is using improper syntax (Note the curly brackets). The section should be corrected to reflect expected usage. This is the definition provided in typeshed/stdlib/tkinter/font.pyi : L15:

_FontDescription: TypeAlias = (
    str  # "Helvetica 12"
    | Font  # A font object constructed in Python
    | list[Any]  # ("Helvetica", 12, BOLD)
    | tuple[Any, ...]
    | _tkinter.Tcl_Obj  # A font object constructed in Tcl
)

Cursor:

You can also specify a bitmap and mask file of your own. See page 179 of Ousterhout’s book.

I recommend prepending the following sentence, as it is far more practical (in most situations) than the bitmap & mask method referenced.

To specify a cursor file (.cur or .ani), use the path to the file, preceded with an @, as in cursor="@path/to/cursor.cur"..

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.