You are here

타이틀바 없애기

안녕하세요....
여기서 공부를 하면서 한층 발전된 저를 느낍니다.... 감사합니다...

버튼에 아이콘을 넣고 텍스트를 넣고 싶었는데...

저희 회사에서 쓰는 버전이 8.3.1이라서..... 제 마음데로 최신버전을 깔수 없는 상황이라서....... 솔직히 package 사용법도 잘모르겠고.....

암튼 여기서 비주얼 tcl를 받아서 Sample중에 제가 원하는게 있는데....

타이틀바를 없애기 너무 어렵네요.....
조언 부탁합니다.... 소스는 지금부터....

#!/bin/sh
# the next line restarts using wish
exec wish "$0" "$@"

if {![info exists vTcl(sourcing(]} {
    switch $tcl_platform(platform( {
        windows {
        }
        default {
            option add *Scrollbar.width 10
        }
    }
   
}

############################
# vTcl Code to Load Stock Images

if {![info exist vTcl(sourcing(]} {
proc vTcl:rename {name} {
    regsub -all "\." $name "_" ret
    regsub -all "\-" $ret "_" ret
    regsub -all " " $ret "_" ret
    regsub -all "/" $ret "__" ret
    regsub -all "::" $ret "__" ret

    return [string tolower $ret]
}

proc vTcl:image:create_new_image {filename description type data} {
    global vTcl env

    # Does the image already exist?

    if {[info exists vTcl(images,files(]} {
        if {[lsearch -exact $vTcl(images,files( $filename] > -1} { return }
    }

    if {![info exists vTcl(sourcing(] && [string length $data] > 0} {
        set object [image create  [vTcl:image:get_creation_type $filename]  -data $data]
    } else {
        # Wait a minute... Does the file actually exist?

        if {! [file exists $filename] } {
            # Try current directory

            set script [file dirname [info script]]
            set filename [file join $script [file tail $filename] ]
        }

        if {![file exists $filename]} {
            set description "file not found!"
            set object [image create photo -data [vTcl:image:broken_image] ]
        } else {
            set object [image create  [vTcl:image:get_creation_type $filename]  -file $filename]
        }
    }

    set reference [vTcl:rename $filename]

    set vTcl(images,$reference,image(       $object
    set vTcl(images,$reference,description( $description
    set vTcl(images,$reference,type(        $type
    set vTcl(images,filename,$object(       $filename

    lappend vTcl(images,files( $filename
    lappend vTcl(images,$type( $object

    # return image name in case caller might want it

    return $object
}

proc vTcl:image:get_image {filename} {
    global vTcl
    set reference [vTcl:rename $filename]

    # Let's do some checking first

    if {![info exists vTcl(images,$reference,image(]} {
        # Well, the path may be wrong; in that case check

       # only the filename instead, without the path.

        set imageTail [file tail $filename]

        foreach oneFile $vTcl(images,files( {
            if {[file tail $oneFile] == $imageTail} {
                set reference [vTcl:rename $oneFile]
                break
            }
        }
    }
    return $vTcl(images,$reference,image(
}

proc vTcl:image:get_creation_type {filename} {
    set ext [file extension $filename]
    set ext [string tolower $ext]

    switch $ext {
        .ppm -
        .gif    {return photo}
        .xbm    {return bitmap}
        default {return photo}
    }
}

proc vTcl:image:broken_image {} {
    return {
        R0lGODdhFAAUAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/
        AP//AAAA//8A/wD//////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAACwAAAAAFAAUAAAIhAAPCBxIsKDBgwgPAljIUOBC
        BAkBPJg4UeBEBBAVPkCI4EHGghIHChAwsKNHgyEPCFBA0mFDkBtVjiz4AADK
        mAds0tRJMCVBBkAl8hwYMsFPBwyE3jzQwKhAoASUwmTagCjDmksbVDWIderC
        g1174gQ71CHFigfOhrXKUGfbrwnjyp0bEAA7
    }
}

foreach img {

        {{[file join C:/ {Program Files} vtcl-1.5.2 images edit ok.gif]} {} stock {}}

            } {
    eval set _file [lindex $img 0]
    vTcl:image:create_new_image
        $_file [lindex $img 1] [lindex $img 2] [lindex $img 3]
}

}
#############################################################################
# Visual Tcl v1.51 Project
#

#################################

# VTCL LIBRARY PROCEDURES
#

if {![info exists vTcl(sourcing(]} {
proc Window {args} {
    global vTcl
    set cmd     [lindex $args 0]
    set name    [lindex $args 1]
    set newname [lindex $args 2]
    set rest    [lrange $args 3 end]
    if {$name == "" || $cmd == ""} { return }
    if {$newname == ""} { set newname $name }
    if {$name == "."} { wm withdraw $name; return }
    set exists [winfo exists $newname]
    switch $cmd {
        show {
            if {$exists} {
                wm deiconify $newname
            } elseif {[info procs vTclWindow$name] != ""} {
                eval "vTclWindow$name $newname $rest"
            }
            if {[wm state $newname] == "normal"} {
                vTcl&#58;FireEvent $newname <<Show>>
            }
        }
        hide    {
            if {$exists} {
                wm withdraw $newname
                vTcl&#58;FireEvent $newname <<Hide>>
                return}
        }
        iconify { if $exists {wm iconify $newname; return} }
        destroy { if $exists {destroy $newname; return} }
    }
}

proc vTcl&#58;WindowsCleanup {} {
    global vTcl
    if {[info exists vTcl(sourcing(]} { return }
    foreach w [winfo children .] {
        wm protocol $w WM_DELETE_WINDOW { exit }
    }
}
}

if {![info exists vTcl(sourcing(]} {
proc {vTcl&#58;DefineAlias} {target alias widgetProc top_or_alias cmdalias} {
    global widget

    set widget($alias( $target
    set widget(rev,$target( $alias

    if {$cmdalias} {
        interp alias {} $alias {} $widgetProc $target
    }

    if {$top_or_alias != ""} {
        set widget($top_or_alias,$alias( $target

        if {$cmdalias} {
            interp alias {} $top_or_alias.$alias {} $widgetProc $target
        }
    }
}

proc {vTcl&#58;DoCmdOption} {target cmd} {
    ## menus are considered toplevel windows

    set parent $target
    while {[winfo class $parent] == "Menu"} {
        set parent [winfo parent $parent]
    }

    regsub -all {%widget} $cmd $target cmd
    regsub -all {%top} $cmd [winfo toplevel $parent] cmd

    uplevel #0 [list eval $cmd]
}

proc {vTcl&#58;FireEvent} {target event} {
    foreach bindtag [bindtags $target] {
        set tag_events [bind $bindtag]
        set stop_processing 0
        foreach tag_event $tag_events {
            if {$tag_event == $event} {
                set bind_code [bind $bindtag $tag_event]
                regsub -all %W $bind_code $target bind_code
                set result [catch {uplevel #0 $bind_code} errortext]
                if {$result == 3} {
                    # break exception, stop processing

                    set stop_processing 1
                } elseif {$result != 0} {
                    bgerror $errortext
                }
                break
            }
        }
        if {$stop_processing} {break}
    }
}

proc {vTcl&#58;Toplevel&#58;WidgetProc} {w args} {
    if {[llength $args] == 0} {
        return -code error "wrong # args&#58; should be "$w option ?arg arg ...?""
    }

    ## The first argument is a switch, they must be doing a configure.

    if {[string index $args 0] == "-"} {
        set command configure

        ## There's only one argument, must be a cget.

        if {[llength $args] == 1} {
            set command cget
        }
    } else {
        set command [lindex $args 0]
        set args [lrange $args 1 end]
    }

    switch -- $command {
        "hide" -
        "Hide" {
            Window hide $w
        }

        "show" -
        "Show" {
            Window show $w
        }

        "ShowModal" {
            Window show $w
            raise $w
            grab $w
            tkwait window $w
            grab release $w
        }

        default {
            eval $w $command $args
        }
    }
}

proc {vTcl&#58;WidgetProc} {w args} {
    if {[llength $args] == 0} {
        return -code error "wrong # args&#58; should be "$w option ?arg arg ...?""
    }

    ## The first argument is a switch, they must be doing a configure.

    if {[string index $args 0] == "-"} {
        set command configure

        ## There's only one argument, must be a cget.

        if {[llength $args] == 1} {
            set command cget
        }
    } else {
        set command [lindex $args 0]
        set args [lrange $args 1 end]
    }

    eval $w $command $args
}

proc {vTcl&#58;toplevel} {args} {
    uplevel #0 eval toplevel $args
    set target [lindex $args 0]
    namespace eval &#58;&#58;$target {}
}
}

if {[info exists vTcl(sourcing(]} {
proc vTcl&#58;project&#58;info {} {
    namespace eval &#58;&#58;widgets&#58;&#58;.top18 {
        array set save {}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top18.cpd19 {
        array set save {-borderwidth 1 -height 1 -relief 1 -takefocus 1 -width 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top18.cpd19.upframe {
        array set save {-borderwidth 1 -height 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top18.cpd19.centerframe {
        array set save {-borderwidth 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top18.cpd19.centerframe.leftframe {
        array set save {-borderwidth 1 -width 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top18.cpd19.centerframe.rightframe {
        array set save {-borderwidth 1 -width 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top18.cpd19.centerframe.05 {
        array set save {-borderwidth 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top18.cpd19.centerframe.05.06 {
        array set save {-borderwidth 1 -image 1 -text 1 -width 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top18.cpd19.centerframe.05.07 {
        array set save {-borderwidth 1 -text 1 -width 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top18.cpd19.downframe {
        array set save {-borderwidth 1 -height 1 -relief 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top18.m23 {
        array set save {-activeborderwidth 1 -borderwidth 1 -font 1 -tearoff 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21 {
        array set save {}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.cpd19 {
        array set save {-borderwidth 1 -height 1 -relief 1 -takefocus 1 -width 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.cpd19.upframe {
        array set save {-borderwidth 1 -height 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.cpd19.centerframe {
        array set save {-borderwidth 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.cpd19.centerframe.leftframe {
        array set save {-borderwidth 1 -width 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.cpd19.centerframe.rightframe {
        array set save {-borderwidth 1 -width 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.cpd19.centerframe.05 {
        array set save {-borderwidth 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.cpd19.centerframe.05.06 {
        array set save {-borderwidth 1 -image 1 -text 1 -width 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.cpd19.centerframe.05.07 {
        array set save {-borderwidth 1 -text 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.cpd19.downframe {
        array set save {-borderwidth 1 -height 1 -relief 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.fra23 {
        array set save {-borderwidth 1 -height 1 -relief 1 -takefocus 1 -width 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.fra23.upframe {
        array set save {-borderwidth 1 -height 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.fra23.centerframe {
        array set save {-borderwidth 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.fra23.centerframe.leftframe {
        array set save {-borderwidth 1 -width 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.fra23.centerframe.rightframe {
        array set save {-borderwidth 1 -width 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.fra23.centerframe.05 {
        array set save {-borderwidth 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.fra23.centerframe.05.06 {
        array set save {-borderwidth 1 -image 1 -text 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.fra23.centerframe.05.07 {
        array set save {-borderwidth 1 -text 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.fra23.downframe {
        array set save {-borderwidth 1 -height 1 -relief 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.lab21 {
        array set save {-text 1 -width 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.ent22 {
        array set save {-background 1 -textvariable 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.lab23 {
        array set save {-text 1 -width 1}
    }
    namespace eval &#58;&#58;widgets&#58;&#58;.top21.ent24 {
        array set save {-background 1 -textvariable 1}
    }
    namespace eval &#58;&#58;widgets_bindings {
        set tagslist {BitmapButtonTop BitmapButtonSub1 BitmapButtonSub2 BitmapButtonSub3}
    }
}
}
#################################
# USER DEFINED PROCEDURES
#
###########################################################
## Procedure&#58;  &#58;&#58;bitmapbutton&#58;&#58;get_parent

namespace eval &#58;&#58;bitmapbutton {

proc {&#58;&#58;bitmapbutton&#58;&#58;get_parent} {W {level 1}} {
global widget

set items [split $W .]
set last [expr [llength $items] - 1]

set parent_items [lrange $items 0 [expr $last - $level] ]
return [join $parent_items .]
}

}
###########################################################
## Procedure&#58;  &#58;&#58;bitmapbutton&#58;&#58;init

namespace eval &#58;&#58;bitmapbutton {

proc {&#58;&#58;bitmapbutton&#58;&#58;init} {W} {
global widget

set N [vTcl&#58;rename $W]
namespace eval &#58;&#58;${N} {
    variable command
    set command ""}
}

}
###########################################################
## Procedure&#58;  &#58;&#58;bitmapbutton&#58;&#58;mouse_down

namespace eval &#58;&#58;bitmapbutton {

proc {&#58;&#58;bitmapbutton&#58;&#58;mouse_down} {W X Y} {
global widget

&#58;&#58;bitmapbutton&#58;&#58;show_state $W sunken

set N [vTcl&#58;rename $W]
namespace eval &#58;&#58;$N {variable state}

set &#58;&#58;${N}&#58;&#58;state "mouse_down"
}

}
###########################################################
## Procedure&#58;  &#58;&#58;bitmapbutton&#58;&#58;mouse_inside

namespace eval &#58;&#58;bitmapbutton {

proc {&#58;&#58;bitmapbutton&#58;&#58;mouse_inside} {W X Y} {
global widget

set button_X [winfo rootx $W]
set button_Y [winfo rooty $W]
set button_width [winfo width $W]
set button_height [winfo height $W]

set N [vTcl&#58;rename $W]
set S "mouse_up"

catch {
   eval set S $&#58;&#58;$N&#58;&#58;state
}

if {$S == "mouse_up"} return

if {$button_X <= $X &&
    $button_X + $button_width >= $X &&
    $button_Y <= $Y &&
    $button_Y + $button_height >= $Y } {
   
   &#58;&#58;bitmapbutton&#58;&#58;show_state $W sunken

} else {

   &#58;&#58;bitmapbutton&#58;&#58;show_state $W raised
}
}

}
###########################################################
## Procedure&#58;  &#58;&#58;bitmapbutton&#58;&#58;mouse_up

namespace eval &#58;&#58;bitmapbutton {

proc {&#58;&#58;bitmapbutton&#58;&#58;mouse_up} {W X Y} {
set button_X [winfo rootx $W]
set button_Y [winfo rooty $W]
set button_width [winfo width $W]
set button_height [winfo height $W]

&#58;&#58;bitmapbutton&#58;&#58;show_state $W raised

set N [vTcl&#58;rename $W]
set S ""
catch {
   eval set S $&#58;&#58;$N&#58;&#58;state
}

if {$S == "mouse_down" } {

    set &#58;&#58;${N}&#58;&#58;state "mouse_up"

    ## command triggered ?

    if {$button_X <= $X &&
        $button_X + $button_width >= $X &&
        $button_Y <= $Y &&
        $button_Y + $button_height >= $Y } {
       
        set &#58;&#58;${N}&#58;&#58;W $W
        namespace eval &#58;&#58;${N} {
            variable command
            variable W
            if {[info exists command] && $command != ""} {
                vTcl&#58;DoCmdOption $W $command
            }
        }
    }
}
}

}
###########################################################
## Procedure&#58;  &#58;&#58;bitmapbutton&#58;&#58;set_command

namespace eval &#58;&#58;bitmapbutton {

proc {&#58;&#58;bitmapbutton&#58;&#58;set_command} {W cmd} {
global widget

set N [vTcl&#58;rename $W]
namespace eval &#58;&#58;${N} {}
set &#58;&#58;${N}&#58;&#58;command $cmd
}

}
###########################################################
## Procedure&#58;  &#58;&#58;bitmapbutton&#58;&#58;show_state

namespace eval &#58;&#58;bitmapbutton {

proc {&#58;&#58;bitmapbutton&#58;&#58;show_state} {W S} {
global widget

set upframe    $W.upframe
set downframe  $W.downframe
set leftframe  $W.centerframe.leftframe
set rightframe $W.centerframe.rightframe

switch $S {

   sunken {
     $W configure -relief sunken
     $upframe    configure -height 4
     $leftframe  configure -width 4
     $rightframe configure -width 1
     $downframe  configure -height 1
   }

   raised {
     $W configure -relief raised
     $upframe configure -height 3
     $leftframe configure -width 3
     $rightframe configure -width 2
     $downframe configure -height 2
   }
}
}

}
###########################################################
## Procedure&#58;  init
###########################################################
## Procedure&#58;  main

proc {main} {argc argv} {
wm protocol .top18 WM_DELETE_WINDOW {exit}
global widget

&#58;&#58;bitmapbutton&#58;&#58;init $widget(TestButton(

&#58;&#58;bitmapbutton&#58;&#58;set_command $widget(TestButton( {
Window show .top21  
}
}

proc init {argc argv} {

}

init $argc $argv

#################################

# VTCL GENERATED GUI PROCEDURES
#

proc vTclWindow. {base {container 0}} {
    if {$base == ""} {
        set base .
    }
   ###################
   # CREATING WIDGETS
   ###################
    if {!$container} {
    wm focusmodel $base passive
    wm geometry $base 200x200+88+116; update
    wm maxsize $base 1028 746
    wm minsize $base 119 1
    wm overrideredirect $base 0
    wm resizable $base 1 1
    wm withdraw $base
    wm title $base "vtcl"
    bindtags $base "$base Vtcl all"
    vTcl&#58;FireEvent $base <<Create>>
    }
   ###################
   # SETTING GEOMETRY
   ###################

    vTcl&#58;FireEvent $base <<Ready>>
}

proc vTclWindow.top18 {base {container 0}} {
    if {$base == ""} {
        set base .top18
    }
    if {[winfo exists $base] && (!$container(} {
        wm deiconify $base; return
    }

    global widget
    vTcl&#58;DefineAlias "$base.cpd19" "TestButton" vTcl&#58;WidgetProc "$base" 1

    ###################

   # CREATING WIDGETS
   ###################
    if {!$container} {
    vTcl&#58;toplevel $base -class Toplevel
   #wm focusmodel $base passive
    wm geometry $base 121x46+109+121; update
   #wm maxsize $base 1030 748
   #wm minsize $base 121 2
   #wm overrideredirect $base 0
    wm resizable $base 1 1
   #wm deiconify $base
   #wm title $base "top18"
    vTcl&#58;FireEvent $base <<Create>>
    }
    frame $base.cpd19
        -borderwidth 2 -height 47 -relief raised -takefocus 1 -width 70
    bindtags $base.cpd19 "$base.cpd19 Frame $base all BitmapButtonTop"
    frame $base.cpd19.upframe
        -borderwidth 2 -height 3
    bindtags $base.cpd19.upframe "$base.cpd19.upframe Frame $base all BitmapButtonSub1"
    frame $base.cpd19.centerframe
        -borderwidth 2
    bindtags $base.cpd19.centerframe "$base.cpd19.centerframe Frame $base all BitmapButtonSub1"
    frame $base.cpd19.centerframe.leftframe
        -borderwidth 2 -width 3
    bindtags $base.cpd19.centerframe.leftframe "$base.cpd19.centerframe.leftframe Frame $base all BitmapButtonSub2"
    frame $base.cpd19.centerframe.rightframe
        -borderwidth 2 -width 2
    bindtags $base.cpd19.centerframe.rightframe "$base.cpd19.centerframe.rightframe Frame $base all BitmapButtonSub2"
    frame $base.cpd19.centerframe.05
        -borderwidth 1
    bindtags $base.cpd19.centerframe.05 "$base.cpd19.centerframe.05 Frame $base all BitmapButtonSub2"
    label $base.cpd19.centerframe.05.06
        -borderwidth 0
        -image [vTcl&#58;image&#58;get_image [file join C&#58;/ {Program Files} vtcl-1.5.2 images edit ok.gif]]
        -text label -width 31
    bindtags $base.cpd19.centerframe.05.06 "$base.cpd19.centerframe.05.06 Label $base all BitmapButtonSub3"
    label $base.cpd19.centerframe.05.07
        -borderwidth 1 -text OK -width 6
    bindtags $base.cpd19.centerframe.05.07 "$base.cpd19.centerframe.05.07 Label $base all BitmapButtonSub3"
    frame $base.cpd19.downframe
        -borderwidth 2 -height 2 -relief groove
    bindtags $base.cpd19.downframe "$base.cpd19.downframe Frame $base all BitmapButtonSub1"
    menu $base.m23
        -activeborderwidth 1 -borderwidth 1 -font {±¼¸² 9} -tearoff 1
   ###################
   # SETTING GEOMETRY
   ###################
    place $base.cpd19
        -x 0 -y 0 -width 70 -height 47 -anchor nw
    pack $base.cpd19.upframe
        -in $base.cpd19 -anchor center -expand 0 -fill none -side top
    pack $base.cpd19.centerframe
        -in $base.cpd19 -anchor center -expand 0 -fill none -side top
    pack $base.cpd19.centerframe.leftframe
        -in $base.cpd19.centerframe -anchor center -expand 0 -fill none
        -side left
    pack $base.cpd19.centerframe.rightframe
        -in $base.cpd19.centerframe -anchor center -expand 0 -fill none
        -side right
    pack $base.cpd19.centerframe.05
        -in $base.cpd19.centerframe -anchor center -expand 0 -fill none
        -side top
    pack $base.cpd19.centerframe.05.06
        -in $base.cpd19.centerframe.05 -anchor center -expand 0 -fill none
        -side top
    pack $base.cpd19.centerframe.05.07
        -in $base.cpd19.centerframe.05 -anchor center -expand 0 -fill none
        -side top
    pack $base.cpd19.downframe
        -in $base.cpd19 -anchor center -expand 0 -fill none -side bottom

    vTcl&#58;FireEvent $base <<Ready>>
}

proc vTclWindow.top21 {base {container 0}} {
    if {$base == ""} {
        set base .top21
    }
    if {[winfo exists $base] && (!$container(} {
        wm deiconify $base; return
    }

    global widget
    vTcl&#58;DefineAlias "$base" "Toplevel1" vTcl&#58;Toplevel&#58;WidgetProc "" 1

    ###################

   # CREATING WIDGETS
   ###################
    if {!$container} {
    vTcl&#58;toplevel $base -class Toplevel
    wm withdraw $base
    wm focusmodel $base passive
    wm geometry $base 219x156+92+199; update
    wm maxsize $base 1028 746
    wm minsize $base 119 1
    wm overrideredirect $base 0
    wm resizable $base 1 1
    wm title $base "Maint Call"
    vTcl&#58;FireEvent $base <<Create>>
    }
    frame $base.cpd19
        -borderwidth 2 -height 47 -relief raised -takefocus 1 -width 55
    bindtags $base.cpd19 "$base.cpd19 Frame $base all BitmapButtonTop"
    frame $base.cpd19.upframe
        -borderwidth 2 -height 3
    bindtags $base.cpd19.upframe "$base.cpd19.upframe Frame $base all BitmapButtonSub1"
    frame $base.cpd19.centerframe
        -borderwidth 2
    bindtags $base.cpd19.centerframe "$base.cpd19.centerframe Frame $base all BitmapButtonSub1"
    frame $base.cpd19.centerframe.leftframe
        -borderwidth 2 -width 3
    bindtags $base.cpd19.centerframe.leftframe "$base.cpd19.centerframe.leftframe Frame $base all BitmapButtonSub2"
    frame $base.cpd19.centerframe.rightframe
        -borderwidth 2 -width 2
    bindtags $base.cpd19.centerframe.rightframe "$base.cpd19.centerframe.rightframe Frame $base all BitmapButtonSub2"
    frame $base.cpd19.centerframe.05
        -borderwidth 1
    bindtags $base.cpd19.centerframe.05 "$base.cpd19.centerframe.05 Frame $base all BitmapButtonSub2"
    label $base.cpd19.centerframe.05.06
        -borderwidth 0
        -image [vTcl&#58;image&#58;get_image [file join C&#58;/ {Program Files} vtcl-1.5.2 images edit ok.gif]]
        -text label -width 26
    bindtags $base.cpd19.centerframe.05.06 "$base.cpd19.centerframe.05.06 Label $base all BitmapButtonSub3"
    label $base.cpd19.centerframe.05.07
        -borderwidth 1 -text OK
    bindtags $base.cpd19.centerframe.05.07 "$base.cpd19.centerframe.05.07 Label $base all BitmapButtonSub3"
    frame $base.cpd19.downframe
        -borderwidth 2 -height 2 -relief groove
    bindtags $base.cpd19.downframe "$base.cpd19.downframe Frame $base all BitmapButtonSub1"
    frame $base.fra23
        -borderwidth 2 -height 47 -relief raised -takefocus 1 -width 52
    bindtags $base.fra23 "$base.fra23 Frame $base all BitmapButtonTop"
    frame $base.fra23.upframe
        -borderwidth 2 -height 3
    bindtags $base.fra23.upframe "$base.fra23.upframe Frame $base all BitmapButtonSub1"
    frame $base.fra23.centerframe
        -borderwidth 2
    bindtags $base.fra23.centerframe "$base.fra23.centerframe Frame $base all BitmapButtonSub1"
    frame $base.fra23.centerframe.leftframe
        -borderwidth 2 -width 3
    bindtags $base.fra23.centerframe.leftframe "$base.fra23.centerframe.leftframe Frame $base all BitmapButtonSub2"
    frame $base.fra23.centerframe.rightframe
        -borderwidth 2 -width 2
    bindtags $base.fra23.centerframe.rightframe "$base.fra23.centerframe.rightframe Frame $base all BitmapButtonSub2"
    frame $base.fra23.centerframe.05
        -borderwidth 1
    bindtags $base.fra23.centerframe.05 "$base.fra23.centerframe.05 Frame $base all BitmapButtonSub2"
    label $base.fra23.centerframe.05.06
        -borderwidth 0
        -image [vTcl&#58;image&#58;get_image [file join C&#58;/ {Program Files} vtcl-1.5.2 images edit ok.gif]]
        -text label
    bindtags $base.fra23.centerframe.05.06 "$base.fra23.centerframe.05.06 Label $base all BitmapButtonSub3"
    label $base.fra23.centerframe.05.07
        -borderwidth 1 -text Cancel
    bindtags $base.fra23.centerframe.05.07 "$base.fra23.centerframe.05.07 Label $base all BitmapButtonSub3"
    frame $base.fra23.downframe
        -borderwidth 2 -height 2 -relief groove
    bindtags $base.fra23.downframe "$base.fra23.downframe Frame $base all BitmapButtonSub1"
    label $base.lab21
        -text {Maint ID &#58;} -width 63
    entry $base.ent22
        -background white -textvariable maint_id
    label $base.lab23
        -text {Message &#58;} -width 58
    entry $base.ent24
        -background white -textvariable message
   ###################
   # SETTING GEOMETRY
   ###################
    place $base.cpd19
        -x 50 -y 100 -width 55 -height 47 -anchor nw
    pack $base.cpd19.upframe
        -in $base.cpd19 -anchor center -expand 0 -fill none -side top
    pack $base.cpd19.centerframe
        -in $base.cpd19 -anchor center -expand 0 -fill none -side top
    pack $base.cpd19.centerframe.leftframe
        -in $base.cpd19.centerframe -anchor center -expand 0 -fill none
        -side left
    pack $base.cpd19.centerframe.rightframe
        -in $base.cpd19.centerframe -anchor center -expand 0 -fill none
        -side right
    pack $base.cpd19.centerframe.05
        -in $base.cpd19.centerframe -anchor center -expand 0 -fill none
        -side top
    pack $base.cpd19.centerframe.05.06
        -in $base.cpd19.centerframe.05 -anchor center -expand 0 -fill none
        -side top
    pack $base.cpd19.centerframe.05.07
        -in $base.cpd19.centerframe.05 -anchor center -expand 0 -fill none
        -side top
    pack $base.cpd19.downframe
        -in $base.cpd19 -anchor center -expand 0 -fill none -side bottom
    place $base.fra23
        -x 150 -y 100 -width 52 -height 47 -anchor nw
    pack $base.fra23.upframe
        -in $base.fra23 -anchor center -expand 0 -fill none -side top
    pack $base.fra23.centerframe
        -in $base.fra23 -anchor center -expand 0 -fill none -side top
    pack $base.fra23.centerframe.leftframe
        -in $base.fra23.centerframe -anchor center -expand 0 -fill none
        -side left
    pack $base.fra23.centerframe.rightframe
        -in $base.fra23.centerframe -anchor center -expand 0 -fill none
        -side right
    pack $base.fra23.centerframe.05
        -in $base.fra23.centerframe -anchor center -expand 0 -fill none
        -side top
    pack $base.fra23.centerframe.05.06
        -in $base.fra23.centerframe.05 -anchor center -expand 0 -fill none
        -side top
    pack $base.fra23.centerframe.05.07
        -in $base.fra23.centerframe.05 -anchor center -expand 0 -fill none
        -side top
    pack $base.fra23.downframe
        -in $base.fra23 -anchor center -expand 0 -fill none -side bottom
    place $base.lab21
        -x 15 -y 15 -width 63 -height 24 -anchor nw -bordermode ignore
    place $base.ent22
        -x 75 -y 20 -anchor nw -bordermode ignore
    place $base.lab23
        -x 14 -y 45 -width 58 -height 24 -anchor nw -bordermode ignore
    place $base.ent24
        -x 75 -y 50 -anchor nw -bordermode ignore

    vTcl&#58;FireEvent $base <<Ready>>
}

bind "BitmapButtonTop" <Button-1> {
    &#58;&#58;bitmapbutton&#58;&#58;mouse_down %W %X %Y
}
bind "BitmapButtonTop" <ButtonRelease-1> {
    &#58;&#58;bitmapbutton&#58;&#58;mouse_up %W %X %Y
}
bind "BitmapButtonTop" <FocusIn> {
    # p "Bitmapbutton gets focus"

%W.centerframe.05 configure -relief groove
}
bind "BitmapButtonTop" <FocusOut> {
    # puts "Bitmapbutton loses focus"

%W.centerframe.05 configure -relief flat
}
bind "BitmapButtonTop" <Key-space> {
    #TODO&#58; your <KeyPress-space> event handler here

&#58;&#58;bitmapbutton&#58;&#58;mouse_down %W [winfo rootx %W] [winfo rooty %W]
}
bind "BitmapButtonTop" <KeyRelease-space> {
    #TODO&#58; your <KeyRelease-space> event handler here

&#58;&#58;bitmapbutton&#58;&#58;mouse_up %W [winfo rootx %W] [winfo rooty %W]
}
bind "BitmapButtonTop" <Motion> {
    &#58;&#58;bitmapbutton&#58;&#58;mouse_inside %W %X %Y
}
bind "BitmapButtonSub1" <Button-1> {
    &#58;&#58;bitmapbutton&#58;&#58;mouse_down [&#58;&#58;bitmapbutton&#58;&#58;get_parent %W] %X %Y
}
bind "BitmapButtonSub1" <ButtonRelease-1> {
    &#58;&#58;bitmapbutton&#58;&#58;mouse_up [&#58;&#58;bitmapbutton&#58;&#58;get_parent %W] %X %Y
}
bind "BitmapButtonSub1" <Motion> {
    &#58;&#58;bitmapbutton&#58;&#58;mouse_inside [&#58;&#58;bitmapbutton&#58;&#58;get_parent %W] %X %Y
}
bind "BitmapButtonSub2" <Button-1> {
    &#58;&#58;bitmapbutton&#58;&#58;mouse_down [&#58;&#58;bitmapbutton&#58;&#58;get_parent %W 2] %X %Y
}
bind "BitmapButtonSub2" <ButtonRelease-1> {
    &#58;&#58;bitmapbutton&#58;&#58;mouse_up [&#58;&#58;bitmapbutton&#58;&#58;get_parent %W 2] %X %Y
}
bind "BitmapButtonSub2" <Motion> {
    &#58;&#58;bitmapbutton&#58;&#58;mouse_inside [&#58;&#58;bitmapbutton&#58;&#58;get_parent %W 2] %X %Y
}
bind "BitmapButtonSub3" <Button-1> {
    &#58;&#58;bitmapbutton&#58;&#58;mouse_down [&#58;&#58;bitmapbutton&#58;&#58;get_parent %W 3] %X %Y
}
bind "BitmapButtonSub3" <ButtonRelease-1> {
    &#58;&#58;bitmapbutton&#58;&#58;mouse_up [&#58;&#58;bitmapbutton&#58;&#58;get_parent %W 3] %X %Y
}
bind "BitmapButtonSub3" <Motion> {
    &#58;&#58;bitmapbutton&#58;&#58;mouse_inside [&#58;&#58;bitmapbutton&#58;&#58;get_parent %W 3] %X %Y
}

Window show .
Window show .top18
Window show .top21

main $argc $argv