# fail.tcl
# Copyright (c) 2003 Digi International Inc., All Rights Reserved
# 
# This software contains proprietary and confidential information of Digi
# International Inc.  By accepting transfer of this copy, Recipient agrees
# to retain this software in confidence, to prevent disclosure to others,
# and to make no use of this software other than that for which it was
# delivered.  This is an unpublished copyrighted work of Digi International
# Inc.  Except as permitted by federal law, 17 USC 117, copying is strictly
# prohibited.
# 
# Restricted Rights Legend
#
# Use, duplication, or disclosure by the Government is subject to
# restrictions set forth in sub-paragraph (c)(1)(ii) of The Rights in
# Technical Data and Computer Software clause at DFARS 252.227-7031 or
# subparagraphs (c)(1) and (2) of the Commercial Computer Software -
# Restricted Rights at 48 CFR 52.227-19, as applicable.
#
# Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
#
# ***************************************************************************

namespace eval Fail {
    variable strType
    variable lstArgs {}
}

proc Fail::MainGuts {w} {
    variable Tab1st
    set frmMain $w.frmfail
    catch {destroy $frmMain}
    if {![winfo exists $frmMain]} {
        frame $frmMain
        BuildPage $frmMain
        grid $frmMain -row 0 -column 0 -sticky news \
         -padx [expr $::numTitleBoldXPad + $::numBorderWidth] -pady 5
    }
    raise $frmMain
    set ::Tab1st $Tab1st
    bind $::Tab1st <<ShiftTab>> {focus $::btnHelp;break}
}

proc Fail::BuildPage {w} {
    variable strType
    variable lstArgs
    variable Tab1st
    set lblHeading $w.lblheading
    ::LabelHeading $lblHeading [mc $strType.body.heading]
    set lblFail [label $w.lblfail -text [eval mc $strType.body.text $lstArgs] \
     -wraplength $::numGutsHeadingWraplength -justify left]
    set lblContinue [label $w.lblcont -text [mc fail.tocontinue] -font fontRegularBold]
    grid $lblHeading -row 0 -column 0 -sticky nw 
    grid $lblFail -row 1 -column 0 -sticky nw -pady 20 
    grid $lblContinue -row 2 -column 0 -sticky sw
    grid columnconfigure $w 0 -weight 1
    grid rowconfigure $w 1 -weight 1
    set Tab1st $::btnStart
}
