Version 19 of winico

Updated 2004-04-01 20:26:18

The purpose of winico is to allow a user to manage the icon on the tk toplevel and taskbar - http://sourceforge.net/projects/tcllib/ more specifically, http://tktable.sourceforge.net/ . Browse the CVS repository [L1 ] to find it. Winico sources are also available through ftp://www.tcl.tk/pub/tcl/nightly-cvs/ .

Winico is indispensable for many desired Windows-specific manipulations. Tom Wilkason describes how to work with an icon in the system tray in a posting to the comp.lang.tcl newsgroup [L2 ].

How does one query whether an icon is still in the tray or not?

I keep track of this with the use of a variable, as you can then query it whenever the mood takes you. Ro

 What: winico
 Where: http://ftp.bj-ig.de/pub/tcltk/winico03.zip 
        http://www.tcl.tk/software/tcltk/netcvs.html 
        ftp://ftp.procplace.com/pub/tcl/sorted/packages-8.0/distrib/cvs-winico.tar.gz 
 Description: Small extension to Tk 8.x for Windows to allow the
        user to set the icon on the Tk toplevel and to set taskbar status
        area icons.  Winico source also available via the Tcl core's
        Net CVS repository.  The Net CVS version has a TEA compliant makefile.
 Updated: 03/2001
 Contact: mailto:[email protected] (Leo Schubert)

Q: Has the functionality of winico been added to the core somewhere in the line of development? (= is it redundent by now?) 08052003

I'm not aware of any TIP to take this action.

Vince: The ability to set a toplevel's icon has been placed in the core -- see 'wm iconbitmap'. It also overcomes a number of small shortcomings with winico in that area.

Vince - does that mean that winico provides no useful functionality for current versions of Tk? What version of Tk ?

Vince: I believe from version 8.4.0. But winico still provides other functionality not in Tk: the ability to manipulate icons/messages in the tray area of the windows taskbar.


Installing winico is not difficult. It certainly is not easy either. There is plenty of room for mistakes. Installing the docs failed. The rest seems to have turned out OK, but Tcl/Tk cannot find the package. I wonder if it is even supposed to work with 8.4.3, as it makes so many references to Tcl/Tk 8.0


Q. 19-Oct-2003.

I recently downloaded Winico and the package contained 2 winico03.dll files. One was about 77kbytes long and the other was about 27kbytes. The long gave me errors loading it but the shorter one works. Does anyone know why there are two versions.

Now that I have winico working, I have placed an icon into the system tray and would like to know how I could create a menu above the icon when the it is left clicked with the mouse.

Can anyone help?

MG April 1st 2004 - I use this for getting menus in the system tray. Works on Win 98, and (I'm told) Win XP.

 winico taskbar add $winico -callback {winicoCallback %m %x %y} -text $yourAppName
 proc winicoCallback {t {x 0} {y 0}} {
     if { $t == "WM_LBUTTONUP" } {
          wm deiconify .
          raise .
          focus .
        } elseif { $t == "WM_RBUTTONUP" } {
          .winicoPopup post $x $y
          .winicoPopup activate 0
        }
   }

where .winicoPopup is a menu I've already created, and . is the main GUI window of my application. That causes a left-click of the icon to bring the application up to the front, and a right-click to post the menu.


Is there no documentation for winico?


Leo Schubert | [ Category Package | ]