public inbox for sourcenav@sourceware.org
 help / color / mirror / Atom feed
* Problems using Tcl/Tk to customize GUI
@ 2001-07-05 10:31 Left Spin
  2001-07-06  0:08 ` Mo DeJong
  0 siblings, 1 reply; 2+ messages in thread
From: Left Spin @ 2001-07-05 10:31 UTC (permalink / raw)
  To: sourcenav

I'm trying to customize the SN GUI using Tcl/Tk under Win98.
I'm new to Tcl/Tk, and I'd sure appreciate some help
getting started using it with SN.

I put a file named rc.tcl in the following directories, it contains the 
sample code to add a shell button to the UI. Needless to say, the
button doesn't show up. What am I doing wrong? Thanks in advance..

c:\program files\source navigator\H-i386-pc-cygwin\share\etc\rc.tcl
c:\home\leftspin\.sn\rc.tcl

I have an environment variable:
HOME=c:\home\leftspin

rc.tcl contains:
proc sn_rc_symbolbrowser {top menu} {
  global tcl_platform

  set tool_frame $top.exp

  # Set a variable that identifies the text widget on
  # the status bar.
  set info $top.msg.msg

  # Create a new button on the toolbar. Note that the
  # button's command invokes the command line tool
  # in the background so that Source-Navigator is not
  # blocked while the tool is running. On Win32, we emulate
  # `xterm' with `cmd'.

  if {!$tcl_platform(platform) != "windows"} {
    set cmdline "exec xterm -T {Source-Navigator} &"
    set description xterm
  } else {
    set cmdline "exec cmd /c start cmd"
    set description shell
  }
  button $tool_frame.xterm -text $description \
      -command $cmdline

  # Set the main window's status bar to read "xterm"
  # or "shell" when the mouse pointer is over the region
  # of the button.
  balloon_bind_info $tool_frame.xterm \
      "Starts a new $description"
  bind $tool_frame.xterm <Leave> "set $top.msg {}"

  # Pack this button onto the toolbar.
  pack $tool_frame.xterm -side left
}

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-07-06  0:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-05 10:31 Problems using Tcl/Tk to customize GUI Left Spin
2001-07-06  0:08 ` Mo DeJong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).