Subject: Re: splash screen - DN [1]


pehrens@ligo.caltech.edu (Phil) - 07 Dec 1999 - comp.lang.tcl

 Cameron Laird <claird@starbase.neosoft.com> wrote:
 >
 >In article <944579759.924045@proxy0.ctxuk.citrix.com>,
 >Colin Ling <colinl@citrix.com> wrote:
 >>Is it possible to have the splash screen start up for 2 - 3 seconds before
 >>the application starts?
 >            .
 >            .
 >            .
 >It's frequently done; 'fact, we probably should have a
 >"splash screen" example somewhere ...

 This is one of the very few pieces of Tk I've ever written,
 so it's probably lacking in finesse.  I put it on the Wiki
 anyway...:

 proc Splash { { art tclpower.gif } { delay 2500 } { artdir "" } } {
      catch { [ winfo ] } errmsg
      if { [ string match invalid* $errmsg ] } {
         return -code error "Splash requires Tk"
         }
      set logo [file join $artdir $art]
      if { [ file exists $logo ] } {
         frame .splash -borderwidth 4 -relief raised
         set logo [ image create photo -file $logo ]
         label .splash.logo -image $logo
         pack  .splash.logo -fill both
         place .splash -anchor c -relx .5 -rely .5
         after $delay destroy .splash
         update
         } else {
         set    msg "Too Bad, splash logo missing!\n"
         append msg "(file: \"$logo\" not found)"
         puts  $msg
         }
      return {}
 }

Last modified
2000-01-04

(195.108.246.50)

Note: you are looking at
the snapshot of an old wiki
- much of this information
is likely to be very outdated