nscl_logo_small.gif (2463 bytes)

Tailoring SpecTcl's splash screen.

HH00706_.wmf (6530 bytes)

SpecTcl Home  General Information User Guide Programmer's Guide Obtaining and Installing

A splash screen is an introductory window that pops up while a program is initializing. Splash screens usually have the following attributes:

SpecTcl now incorporates a splash screen package. The package is open source re-distributed under the license terms. The copyright holder of the package is the "Swedish Institute of Computer Science". I would like ot acknowledge and thank them for releasing this package into the open source freely redistributable domain.

The SpecTclRC.tcl file in $SpecTclHome/Skel, as of version 3.2 creates and initializes a splash screen. The following lines of code setup the initial splash screen:

lappend auto_path $SpecTclHome/TclLibs
package require splash
package require img::jpeg

set splash [splash::new -text 1 -imgfile $splashImage -progress 6 -hidemain 0]
splash::progress $splash {Loading button bar} 0


The splash screen can be tailored in several ways; we'll mention two here:

Splash screen progress indicators and text can be tailored as follows:

  1. In the splash::new command modify the number following the -progress switch to reflect the number of initialization steps you want the progress indicator to reflect.
  2. Add splash::progress commands whenever you want to update the progress bar and/or the progess text. This command should have the following form:
    splash::progress $splash progress_text  progress_increment

  3. Top Programmer's Guide

    Last modified: Mon Apr 9 11:33:30 EDT 2007