Hi:

I wanted to have another toolbar item (in vtcl)
to toggle the Console window on and off,
but was not sure how to add one. It occured to
me that the ... command button (2nd widget from left)
was available in 2 other ways: double click the
widget you are interested in or use ... button
in the atributes window. So, I appropriated the
one in the toolbar:

This lets me take a quick look by clicking the
console on, then the mouse is still over the
button and i can click it back off. Easier than
using the menu and finding the close box. 

The change was simple in attribar.tcl about line 170:

   button .vTcl.attr.01.03 \
        -highlightthickness 0 -bd 1 -padx 4 -pady 1 -image ellipses -command {
            #vTcl:set_command $vTcl(w,widget)
            global vTcl console_toggle_variable
            if { ! [info exists console_toggle_variable] } {
                vTcl:show_console
                set console_toggle_variable 1
            } else {
                console hide
                unset console_toggle_variable
            }
        }
    vTcl:set_balloon .vTcl.attr.01.03 "Toggle Console"


The original was

   button .vTcl.attr.01.03 \
        -highlightthickness 0 -bd 1 -padx 4 -pady 1 -image ellipses -command {
            vTcl:set_command $vTcl(w,widget) 
        }
    vTcl:set_balloon .vTcl.attr.01.03 "command"


This also changes the balloon help. 

Also, I have a little difficulty working with the small
console font (on my windows pc) and a change to show_console
in console.tcl (the 1 line below at "console eval") changes that.

Ideally, this could be a prefs item, but that
is beyond my ability to change at this time. (BTW, my reference
book says that the console command only works on windows and
mac systems - I wonder why).

proc vTcl:show_console {} {
    global vTcl tcl_platform
    if {$vTcl(console) == 1} {
        console show
        console eval {.console configure -font {courier 12}}
    } else {
        Window show .vTcl.con
    }
}


regards
eric


_______________________________________________
vtcl-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/vtcl-user

Reply via email to