head	1.4;
access;
symbols
	core-8-5-9:1.4
	core-8-5-8:1.4
	macosx-cocoa-merge:1.4
	macosx-cocoa-premerge:1.4
	macosx-carbon-freeze:1.4
	core-8-5-7:1.4
	core-8-5-6:1.4
	core-8-6-b1:1.4
	core-8-6-a3:1.4
	core-8-5-5:1.4
	core-8-6-a2:1.4
	core-8-5-4:1.4
	core-8-5-3:1.4
	core-8-6-a1:1.4
	core-8-4-19:1.2
	core-8-5-branch:1.4.0.4
	core-8-5-2:1.4
	core-8-4-18:1.2
	core-8-5-1:1.4
	core-8-4-17:1.2
	core-8-5-0:1.4
	core-8-5-b3:1.4
	core-8-5-b2:1.4
	core-8-4-16:1.2
	core-8-5-b1:1.4
	core-stablilizer-merge:1.4
	core-stabilizer-branch:1.4.0.2
	core-stabilizer-merge:1.4
	core-8-4-15:1.2
	core-8-5-a6:1.4
	core-8-5-a5:1.4
	core-8-4-14:1.2
	core-8-5-a4:1.4
	core-8-4-13:1.2
	core-8-4-12:1.2
	core-8-4-11:1.2
	core-8-5-a3:1.4
	core-8-4-10:1.2
	core-8-4-9-branch:1.2.0.6
	core-8-5-a2:1.3
	core-8-4-9:1.2
	core-8-4-8:1.2
	core-8-4-7:1.2
	core-8-5-a1:1.3
	core-8-4-6:1.2
	core-8-4-5:1.2
	mistachkin-dev-branch:1.3.0.2
	core-8-4-4:1.2
	core-8-4-3:1.2
	core-8-4-branch:1.2.0.4
	core-8-4-2:1.2
	core-8-4-1:1.2
	core-8-4-0:1.2
	macosx-8-4-merge-2002-08-31-trunk:1.2
	macosx-8-4-premerge-2002-08-31-branch:1.1.2.1
	macosx-8-4-premerge-2002-08-31-trunk:1.2
	macosx-8-4-merge-2002-08-30-branch:1.1.2.1
	macosx-8-4-merge-2002-08-30-trunk:1.2
	macosx-8-4-merge-2002-08-20-branch:1.1.2.1
	macosx-8-4-merge-2002-08-20-trunk:1.2
	core-8-4-b2:1.2
	core-8-4-b1:1.2
	macosx-premerge-6-9-02:1.1.2.1
	core-8-4-win-speedup:1.2.0.2
	core-8-4-a4:1.2
	macosx-8-4-branch:1.1.0.2
	macosx-8-4-branchpoint:1.1;
locks; strict;
comment	@# @;


1.4
date	2004.12.21.11.56.35;	author dkf;	state Exp;
branches;
next	1.3;

1.3
date	2003.08.20.23.02.18;	author hobbs;	state Exp;
branches;
next	1.2;

1.2
date	2001.10.30.11.21.50;	author dkf;	state Exp;
branches
	1.2.2.1;
next	1.1;

1.1
date	2001.09.26.21.36.19;	author pspjuth;	state Exp;
branches
	1.1.2.1;
next	;

1.1.2.1
date	2002.02.05.02.25.16;	author wolfsuit;	state Exp;
branches;
next	;

1.2.2.1
date	2002.04.02.20.58.50;	author hobbs;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Coding style improvements for the widget demo. [FRQ 815118]
@
text
@# labelframe.tcl --
#
# This demonstration script creates a toplevel window containing
# several labelframe widgets.
#
# RCS: @@(#) $Id: labelframe.tcl,v 1.3 2003/08/20 23:02:18 hobbs Exp $

if {![info exists widgetDemo]} {
    error "This script should be run from the \"widget\" demo."
}

package require Tk

set w .labelframe
catch {destroy $w}
toplevel $w
wm title $w "Labelframe Demonstration"
wm iconname $w "labelframe"
positionWindow $w

# Some information

label $w.msg -font $font -wraplength 4i -justify left -text "Labelframes are\
	used to group related widgets together.  The label may be either \
	plain text or another widget."
pack $w.msg -side top

## See Code / Dismiss buttons
set btns [addSeeDismiss $w.buttons $w]
pack $btns -side bottom -fill x

# Demo area

frame $w.f
pack $w.f -side bottom -fill both -expand 1
set w $w.f

# A group of radiobuttons in a labelframe

labelframe $w.f -text "Value" -padx 2 -pady 2
grid $w.f -row 0 -column 0 -pady 2m -padx 2m

foreach value {1 2 3 4} {
    radiobutton $w.f.b$value -text "This is value $value" \
            -variable lfdummy -value $value
    pack $w.f.b$value -side top -fill x -pady 2
}


# Using a label window to control a group of options.

proc lfEnableButtons {w} {
    foreach child [winfo children $w] {
        if {$child == "$w.cb"} continue
        if {$::lfdummy2} {
            $child configure -state normal
        } else {
            $child configure -state disabled
        }
    }
}

labelframe $w.f2 -pady 2 -padx 2
checkbutton $w.f2.cb -text "Use this option." -variable lfdummy2 \
        -command "lfEnableButtons $w.f2" -padx 0
$w.f2 configure -labelwidget $w.f2.cb
grid $w.f2 -row 0 -column 1 -pady 2m -padx 2m

set t 0
foreach str {Option1 Option2 Option3} {
    checkbutton $w.f2.b$t -text $str
    pack $w.f2.b$t -side top -fill x -pady 2
    incr t
}
lfEnableButtons $w.f2


grid columnconfigure $w {0 1} -weight 1
@


1.3
log
@	* library/demos/widget:      Redo code view dialog, use named fonts,
	* library/demos/arrow.tcl:   add basic see/dismiss routine with
	* library/demos/bind.tcl:    images for better look & feel
	* library/demos/bitmap.tcl:
	* library/demos/button.tcl:
	* library/demos/check.tcl:
	* library/demos/clrpick.tcl:
	* library/demos/colors.tcl:
	* library/demos/cscroll.tcl:
	* library/demos/ctext.tcl:
	* library/demos/entry1.tcl:
	* library/demos/entry2.tcl:
	* library/demos/entry3.tcl:
	* library/demos/filebox.tcl:
	* library/demos/floor.tcl:
	* library/demos/form.tcl:
	* library/demos/hscale.tcl:
	* library/demos/icon.tcl:
	* library/demos/image1.tcl:
	* library/demos/image2.tcl:
	* library/demos/items.tcl:
	* library/demos/label.tcl:
	* library/demos/labelframe.tcl:
	* library/demos/menu.tcl:
	* library/demos/menubu.tcl:
	* library/demos/paned1.tcl:
	* library/demos/paned2.tcl:
	* library/demos/plot.tcl:
	* library/demos/puzzle.tcl:
	* library/demos/radio.tcl:
	* library/demos/ruler.tcl:
	* library/demos/sayings.tcl:
	* library/demos/search.tcl:
	* library/demos/spin.tcl:
	* library/demos/states.tcl:
	* library/demos/style.tcl:
	* library/demos/text.tcl:
	* library/demos/twind.tcl:
	* library/demos/unicodeout.tcl:
	* library/demos/vscale.tcl:
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: labelframe.tcl,v 1.2 2001/10/30 11:21:50 dkf Exp $
d12 2
@


1.2
log
@Improvements to widget demo (integrates/demonstrates the new 8.4 widgets)
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: labelframe.tcl,v 1.1 2001/09/26 21:36:19 pspjuth Exp $
d26 3
a28 7
# The bottom buttons

frame $w.buttons
pack $w.buttons -side bottom -fill x -pady 2m
button $w.buttons.dismiss -text Dismiss -command "destroy $w" -width 15
button $w.buttons.code -text "See Code" -command "showCode $w" -width 15
pack $w.buttons.dismiss $w.buttons.code -side left -expand 1
@


1.2.2.1
log
@sync with head
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: labelframe.tcl,v 1.2 2001/10/30 11:21:50 dkf Exp $
@


1.1
log
@Added labelframe widget. TIP#18.
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: button.tcl,v 1.2 1998/09/14 18:23:27 stanton Exp $
d22 2
a23 1
typically used to group related widgets together."
d46 1
a46 1
    radiobutton $w.f.b$value -text $value -width 3 \
@


1.1.2.1
log
@Merge with current TOT
Added support for the wm stackorder command
Fixed crash when selecting Menu items in the Application menu that we didn't
put there.
Added first bits of the use of CG for low-level drawing.  The line-drawing works,
the rest doesn't yet.  You have to set the file static useCGDrawing to 1 and
rebuild to activate this code.
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: labelframe.tcl,v 1.1 2001/09/26 21:36:19 pspjuth Exp $
d22 1
a22 2
	used to group related widgets together.  The label may be either \
	plain text or another widget."
d45 1
a45 1
    radiobutton $w.f.b$value -text "This is value $value" \
@


