Daniel Huckson
Daniel Huckson

Reputation: 1247

Tkinter ttk.PanedWindow sash position

Hi can anyone please tell me if there is a way to get the sash positon of a ttk PanedWindow. With tk.PanedWindow you can use sash_coord() but that doesn't seem to work for ttk.

Upvotes: 0

Views: 1089

Answers (1)

Bryan Oakley
Bryan Oakley

Reputation: 386352

You can use the sashpos method. It takes an index for the Nth sash. For example, if you just have a single sash separating two widgets, you would use the value 0 (zero):

pw = ttk.Panedwindow(...)
...
print(pw.sashpos(0))

Upvotes: 1

Related Questions