Pelokalan
Python ID
id en
Masuk
Proyek
library__tkinter-ttk.po Berkas proyek · python-docs-id-3.14 · Bahasa Indonesia
Modul PO Hanya lihat
Teks sumber — English
Terjemahan — Bahasa Indonesia
Specifies how to display the image relative to the text, in the case both text and images options are present. Valid values are:
The :class:`ttk.Combobox <Combobox>` widget combines a text field with a pop-down list of values. This widget is a subclass of :class:`Entry`.
A script (possibly registered with Misc.register) that is called immediately before displaying the values. It may specify which values to display.
One of "normal", "readonly", or "disabled". In the "readonly" state, the value may not be edited directly, and the user can only select one of the values from the dropdown list. In the "normal" state, the text field is directly editable. In the "disabled" state, no interaction is possible.
values
nilai
Specifies the list of values to display in the drop-down listbox.
The combobox widgets generates a **<<ComboboxSelected>>** virtual event when the user selects an element from the list of values.
If *newindex* is specified, sets the combobox value to the element position *newindex*. Otherwise, returns the index of the current value or -1 if the current value is not in the values list.
The :class:`ttk.Spinbox <Spinbox>` widget is a :class:`ttk.Entry <Entry>` enhanced with increment and decrement arrows. It can be used for numbers or lists of string values. This widget is a subclass of :class:`Entry`. Besides the methods inherited from :class:`Widget`: :meth:`~tkinter.Misc.cget`, :meth:`~tkinter.Misc.configure`, :meth:`~Widget.identify`, :meth:`~Widget.instate` and :meth:`~Widget.state`, and the following inherited from :class:`Entry`: :meth:`~Entry.bbox`, :meth:`~tkinter.Entry.delete`, :meth:`~tkinter.Entry.icursor`, :meth:`~tkinter.Entry.index`, :meth:`~tkinter.Entry.insert`, :meth:`xview* <tkinter.XView.xview>`, it has some other methods, described at :class:`ttk.Spinbox <Spinbox>`.
Sequence of string or float values. If specified, the increment/decrement buttons will cycle through the items in this sequence rather than incrementing or decrementing numbers.
With a non-integer increment, see :ref:`numeric values and the locale <tkinter-numeric-locale>`.
Specifies how to display the image relative to the text, in the case both options text and image are present. See `Label Options`_ for legal values.
If *kw* is not given, returns a dictionary of the tab option values. If *option* is specified, returns the value of that *option*. Otherwise, sets the options to the corresponding values.
The :class:`ttk.Treeview <Treeview>` widget displays a hierarchical collection of items. Each item has a textual label, an optional image, and an optional list of data values. The data values are displayed in successive columns after the tree label.
The order in which data values are displayed may be controlled by setting the widget option ``displaycolumns``. The tree widget can also display column headings. Columns may be accessed by number or symbolic names listed in the widget option columns. See `Column Identifiers`_.
A list containing zero or more of the following values, specifying which elements of the tree to display.
Tk 9.0 added several :class:`Treeview` features. The *selectmode* option gained the values ``"single"`` and ``"multiple"``; the new widget options *selecttype* (``"item"`` or ``"cell"`` selection), *striped* (zebra-striped rows), and *titlecolumns* / *titleitems* (columns or rows frozen against scrolling) were introduced; the column *separator* option was added; and items gained a *hidden* option. Tk 9.1 added the *rowheight* and *headingheight* options.
The list of values associated with the item.
Each item should have the same number of values as the widget option columns. If there are fewer values than columns, the remaining values are assumed empty. If there are more values than columns, the extra values are ignored.
Item's option values may be displayed in a different order than the order in which they are stored.
A data column number is an index into an item's option values list; a display column number is the column number in the tree where the values are displayed. Tree labels are displayed in column #0. If option displaycolumns is not set, then data column n is displayed in column #n+1. Again, **column #0 always refers to the tree column**.
If *kw* is not given, returns a dict of the column option values. If *option* is specified then the value for that *option* is returned. Otherwise, sets the options to the corresponding values.
The valid options/values are:
*anchor*: One of the standard Tk anchor values.
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.
Specifies how the heading text should be aligned. One of the standard Tk anchor values.
If no options are given, a dict with options/values for the item is returned. If *option* is specified then the value for that option is returned. Otherwise, sets the options to the corresponding values as given by *kw*.
If *kw* is not given, returns a dict of the option settings for *tagname*. If *option* is specified, returns the value for that *option* for the specified *tagname*. Otherwise, sets the options to the corresponding values for the given *tagname*.
Query or sets dynamic values of the specified option(s) in *style*.
When called to query the map (without specifying values to set), it returns a dictionary mapping each option to its list of statespecs.
Ttk :class:`OptionMenu` widget, a :class:`Menubutton` that pops up a menu of mutually exclusive choices. *variable* is the variable that tracks the currently selected value, *default* is the value to set initially, and *values* are the entries to display in the menu. A *command* keyword argument may be given to specify a callable that is invoked with the selected value whenever the selection changes; the *style* keyword argument sets the style used by the underlying menubutton; the *direction* keyword argument sets where the menu is posted relative to the menubutton (one of ``'above'``, ``'below'`` (the default), ``'left'``, ``'right'`` or ``'flush'``); and the *name* keyword argument sets the Tk widget name.
Replace the entries of the menu with *values*. If *default* is given, also set it as the current value of the *variable*.
Query or modify the options of the specified *pane*, where *pane* is either an integer index or the name of a managed subwindow. If no arguments are given, return a dictionary of the pane option values. If *option* is specified, return the value of that option. Otherwise, set the options given as keyword arguments to their corresponding values.
Ttk :class:`Radiobutton` widget, used as part of a group to control a single shared variable by selecting one of several mutually exclusive values. It is the themed counterpart of :class:`tkinter.Radiobutton` and inherits the common widget methods from :class:`Widget`.
Modify or query the widget options, like :meth:`Widget.configure <tkinter.Misc.configure>`. In addition, this method clips the ``from`` and ``to`` values so that the current value stays within the range defined by them.