Use a disclosure frame when you want to provide a simple default view of something but need to allow the user to view
more details or perform additional actions at times.
The frame "$w.frame" is managed by the widget. All 'disclosed' sub-widgets should be packed or gridded into
This widget appears in TclMacBag v0.11 and above.
This command initialises the disclosure frame.
The label to be presented to the user.
From v0.14: Creating the widget without a -label option creates a disclosure frame without a visible control. This
can be quite useful for providing areas which can be switched on and off at user will, such as status bars.
On Mac OS X, the usual behaviour when a dialog changes size (for example, due to a disclosure
frame becoming active) is for the window to automatically change size to suit.
Using this option enables this behaviour.
Sets the font of the dframe's text label to a font defined by fontName.
This option exists in v0.13 and up.
This command allows you to programatically change the state of the disclosure frame from its current state (eg, open) to
its opposite (eg, closed).
::tclmacbag::dframe::ToggleTo pathName ?Options?
This command allows you to programatically toggle the state of the disclosure frame to a particular state (open or
Selects the state the widget should be toggled to.
set w .sf ; set f $w.frame
grid [::tclmacbag::dframe $w -label "Details"] -row 1 -column 1 -sticky nsew
grid [ttk::label $f.l1 -text "Hello"] -row 1 -column 1 -sticky w
grid [ttk::label $f.l2 -text "World"] -row 2 -column 1 -sticky w
While the -autoresize option handles the resizing, it does not (currently) have the animation effect
characteristic of Mac resizing (which appears to be done by taking a screen grab of the before and after
effects and fading between them). A plain resize effect may be unexpected to some Mac users.
The autoresize is only triggered when the vertical size of the toplevel has changed.