def test_toggledframe_open_close(self): frame = ToggledFrame(self.window) frame.pack() frame.toggle() self.assertTrue(frame._open) frame.toggle() self.assertFalse(frame._open)
def test_toggledframe_init(self): frame = ToggledFrame(self.window) frame.pack() self.window.update()
# -*- coding: utf-8 -*- # Copyright (c) RedFantom 2017 # For license see LICENSE from ttkwidgets.frames import ToggledFrame try: import Tkinter as tk import ttk except ImportError: import tkinter as tk from tkinter import ttk window = tk.Tk() frame = ToggledFrame(window, text="Value", width=10) frame.pack() button = ttk.Button(frame.interior, text="Button", command=window.destroy) button.grid() frame.toggle() window.mainloop()