The Scale widget

Tkinter Scale Widget

The purpose of a scale widget is to allow the user to set some integer or float value within a specified range. Here are two scale widgets, one horizontal and one vertical Each scale displays a slider that the user can drag along a trough to change the value. In the figure, the first slider is currently at -0.38 and the second at 7. You can drag the slider to a new value with mouse button 1. If you click button 1 in the trough, the slider will move one increment in that direction per click....

Canvas rectangle objects

Each rectangle is specified as two points x0, y0 is the top left corner, and x1, y1 is the location of the pixel just outside of the bottom right corner. For example, the rectangle specified by top left corner 100,100 and bottom right corner 102,102 is a square two pixels by two pixels, including pixel 101,101 but not including 102,102 . The outline lies inside the rectangle on its top and left sides, but outside the rectangle on its bottom and right side. The default appearance is a...

The Spinbox widget

Tkinter Scrollbar

The Spinbox widget allows the user to select values from a given set. The values may be a range of numbers, or a fixed set of strings. On the screen, a Spinbox has an area for displaying the current values, and a pair of arrowheads. The user can click the upward-pointing arrowhead to advance the value to the next higher value in sequence. If the value is already at maximum, you can set up the widget, if you wish, so that the new value will wrap around to the lowest value. The user can click the...

Cap and join styles

For pleasant and effective rendering of diagrams, sometimes it is a good idea to pay attention to cap and join styles. The cap style of a line is the shape of the end of the line. Styles are BUTT The end of the line is cut off square at a line that passes through the endpoint. PROJECTING The end of the line is cut off square, but the cut line projects past the endpoint a distance equal to half the line's width. ROUND The end describes a semicircle centered on the endpoint. The join style...