head	1.4;
access;
symbols
	core-8-5-9:1.3
	core-8-5-8:1.3
	macosx-cocoa-merge:1.4
	macosx-cocoa-premerge:1.4
	macosx-carbon-freeze:1.4
	core-8-5-7:1.3
	core-8-5-6:1.3
	core-8-6-b1:1.4
	core-8-6-a3:1.3
	core-8-5-5:1.3
	core-8-6-a2:1.3
	core-8-5-4:1.3
	core-8-5-3:1.3
	core-8-6-a1:1.3
	core-8-5-branch:1.3.0.2
	core-8-5-2:1.3
	core-8-5-1:1.3
	core-8-5-0:1.3
	core-8-5-b3:1.2
	core-8-5-b2:1.2
	core-stabilizer-branch:1.2.0.2
	core-stabilizer-merge:1.3;
locks; strict;
comment	@# @;


1.4
date	2008.12.11.18.13.08;	author jenglish;	state Exp;
branches;
next	1.3;

1.3
date	2007.12.13.15.27.07;	author dgp;	state Exp;
branches;
next	1.2;

1.2
date	2007.10.23.06.31.16;	author das;	state Exp;
branches
	1.2.2.1;
next	1.1;

1.1
date	2007.10.22.14.21.16;	author dkf;	state Exp;
branches;
next	;

1.2.2.1
date	2007.10.23.06.31.16;	author dgp;	state dead;
branches;
next	1.2.2.2;

1.2.2.2
date	2007.10.24.12.59.33;	author dgp;	state Exp;
branches;
next	;


desc
@@


1.4
log
@library/demos/*.tcl: Omit contraindicated [package require Ttk].
Remove logic that switches [ttk::scrollbar]s to [tk::scrollbar]s
based on [tk windowingsystem]; this is already handled in
library/ttk/scrollbar.tcl.
@
text
@# ttkprogress.tcl --
#
# This demonstration script creates several progress bar widgets.
#
# RCS: @@(#) $Id: ttkprogress.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp $

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

package require Tk

set w .ttkprogress
catch {destroy $w}
toplevel $w
wm title $w "Progress Bar Demonstration"
wm iconname $w "ttkprogress"
positionWindow $w

ttk::label $w.msg -font $font -wraplength 4i -justify left -text "Below are two progress bars. The top one is a \u201Cdeterminate\u201D progress bar, which is used for showing how far through a defined task the program has got. The bottom one is an \u201Cindeterminate\u201D progress bar, which is used to show that the program is busy but does not know how long for. Both are run here in self-animated mode, which can be turned on and off using the buttons underneath."
pack $w.msg -side top -fill x

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

ttk::frame $w.f
pack $w.f -fill both -expand 1
set w $w.f

proc doBars {op args} {
    foreach w $args {
	$w $op
    }
}
ttk::progressbar $w.p1 -mode determinate
ttk::progressbar $w.p2 -mode indeterminate
ttk::button $w.start -text "Start Progress" -command [list \
	doBars start $w.p1 $w.p2]
ttk::button $w.stop -text "Stop Progress" -command [list \
	doBars stop $w.p1 $w.p2]

grid $w.p1 - -pady 5 -padx 10
grid $w.p2 - -pady 5 -padx 10
grid $w.start $w.stop -padx 10 -pady 5
grid configure $w.start -sticky e
grid configure $w.stop -sticky w
grid columnconfigure $w all -weight 1
@


1.3
log
@merge stable branch onto HEAD
@
text
@d5 1
a5 1
# RCS: @@(#) $Id: ttkprogress.tcl,v 1.2.2.2 2007/10/24 12:59:33 dgp Exp $
a11 1
package require Ttk
@


1.2
log
@	* library/demos/combo.tcl:	Aqua GOOBE.
	* library/demos/toolbar.tcl:
	* library/demos/tree.tcl:
	* library/demos/ttknote.tcl:
	* library/demos/ttkprogress.tcl:
	* library/demos/widget:
@
text
@d5 1
a5 1
# RCS: @@(#) $Id: ttkprogress.tcl,v 1.1 2007/10/22 14:21:16 dkf Exp $
@


1.2.2.1
log
@file ttkprogress.tcl was added on branch core-stabilizer-branch on 2007-10-24 12:59:33 +0000
@
text
@d1 49
@


1.2.2.2
log
@merge updates from HEAD
@
text
@a0 49
# ttkprogress.tcl --
#
# This demonstration script creates several progress bar widgets.
#
# RCS: @@(#) $Id: ttkprogress.tcl,v 1.2 2007/10/23 06:31:16 das Exp $

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

package require Tk
package require Ttk

set w .ttkprogress
catch {destroy $w}
toplevel $w
wm title $w "Progress Bar Demonstration"
wm iconname $w "ttkprogress"
positionWindow $w

ttk::label $w.msg -font $font -wraplength 4i -justify left -text "Below are two progress bars. The top one is a \u201Cdeterminate\u201D progress bar, which is used for showing how far through a defined task the program has got. The bottom one is an \u201Cindeterminate\u201D progress bar, which is used to show that the program is busy but does not know how long for. Both are run here in self-animated mode, which can be turned on and off using the buttons underneath."
pack $w.msg -side top -fill x

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

ttk::frame $w.f
pack $w.f -fill both -expand 1
set w $w.f

proc doBars {op args} {
    foreach w $args {
	$w $op
    }
}
ttk::progressbar $w.p1 -mode determinate
ttk::progressbar $w.p2 -mode indeterminate
ttk::button $w.start -text "Start Progress" -command [list \
	doBars start $w.p1 $w.p2]
ttk::button $w.stop -text "Stop Progress" -command [list \
	doBars stop $w.p1 $w.p2]

grid $w.p1 - -pady 5 -padx 10
grid $w.p2 - -pady 5 -padx 10
grid $w.start $w.stop -padx 10 -pady 5
grid configure $w.start -sticky e
grid configure $w.stop -sticky w
grid columnconfigure $w all -weight 1
@


1.1
log
@More widget demos!
@
text
@d5 1
a5 1
# RCS: @@(#) $Id$
d21 10
a30 2
label $w.msg -font $font -wraplength 4i -justify left -text "Below are two progress bars. The top one is a \u201Cdeterminate\u201D progress bar, which is used for showing how far through a defined task the program has got. The bottom one is an \u201Cindeterminate\u201D progress bar, which is used to show that the program is busy but does not know how long for. Both are run here in self-animated mode, which can be turned on and off using the buttons underneath."
grid $w.msg - -sticky ew
d49 1
a49 6

## See Code / Dismiss buttons
set btns [addSeeDismiss $w.buttons $w]
grid $btns - - -sticky ews
grid columnconfigure $w 2 -weight 1
grid rowconfigure $w $btns -weight 1
@

