Question

Is there a way to create single pixel wide horizontal and vertical ttk.Separator()'s?

Python 2.7/Windows: When I magnify the ttk Separators they are built as 2 parallel lines - one line gray and one line a light/white color. The latter color added to create a subtle 3d effect?

I would like to create single pixel wide separators that have the system default gray color. A bonus would be the ability to programmatically discover the system color used for a separator's gray band.

Was it helpful?

Solution

If you need a single pixel line, create a normal frame with a width of 1. It will have the default gray background. If you want the background of the root window you can always just ask:

import Tkinter as tk
root = tk.Tk()
print "background is", root["background"]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top