Next / Previous / Contents

43. ttk.Separator

Use this widget to place a horizontal or vertical bar that separates other widgets. The widget is rendered as a 2-pixel wide line. Be sure to use the sticky options to the .grid() method to stretch the widget, or it will appear as only a single pixel.

To create a ttk.Separator as the child of a given parent widget, where the option values are given in Table 61, “ttk.Separator options”:

    w = ttk.Separator(parent, option=value, ...)

Table 61. ttk.Separator options

class_ The widget class name. This may be specified when the widget is created, but cannot be changed later. For an explanation of widget classes, see Section 27, “Standardizing appearance”.
orient Set orient=tk.HORIZONTAL for a horizontal separator, orient=tk.VERTICAL for a vertical one (the default orientation).
style The style to be used in rendering this scrollbar; see Section 49, “Using and customizing ttk styles”. The only style feature you can configure is background, which specifies the color of the separator bar; the default color is a dark gray.

The only methods available on a ttk.Separator widgets are the ones listed in Section 46, “Methods common to all ttk widgets”.