Re: Some issues on Tk



Hi Shawn,

about 1):

I use the "wm iconbitmap" command to change the icon of the main
window. Here an extract of the wm man page:

wm iconbitmap window ?bitmap?
If bitmap is specified, then it names a bitmap in the standard
forms accepted by Tk (see the Tk_GetBitmap manual entry for details).
This bitmap is passed to the window manager to be displayed in window's
icon, and the command returns an empty string. If an empty string is
specified for bitmap, then any current icon bitmap is cancelled for
window. If bitmap is specified then the command returns an empty
string. Otherwise it returns the name of the current icon bitmap
associated with window, or an empty string if window has no icon
bitmap. On the Windows operating system, an additional flag is
supported: wm iconbitmap window ?-default? ?image?. If the -default
flag is given, the icon is applied to all toplevel windows (existing
and future) to which no other specific icon has yet been applied. In
addition to bitmap image types, a full path specification to any file
which contains a valid Windows icon is also accepted (usually .ico or
..icr files), or any file for which the shell has assigned an icon. Tcl
will first test if the file contains an icon, then if it has an
assigned icon, and finally, if that fails, test for a bitmap.

Best regards,

Martin Lemburg
UGS - Transforming the Process of Innovation

.



Relevant Pages

  • Tkinter bitmap bug ?
    ... I want to create a window icon for a Tkinter application and tried ... root = Tk ... external bitmap file around, so I tried to pass the bitmap data to a BitmapImage ... returns a window with only one button with the PhotoImage correctly displayed. ...
    (comp.lang.python)
  • Re: How do I set the icon for a window using Ruby Tk?
    ... Sets the bitmap displayed in the icon to bitmap. ... Perhaps this code can change the window icon on platforms running X- Window/Motif, but I can't say from experience. ... From OS X's point of view the Ruby program is a Unix command line session, and it displays the appropriate icon for such a session in the dock. ...
    (comp.lang.ruby)
  • Re: TK icon file format
    ... If bitmap is specified, then it names a bitmap in the standard forms ... bitmap is passed to the window manager to be displayed in window's ... icon, and the command returns an empty string. ...
    (comp.lang.tcl)
  • Re: TK icon file format
    ... If bitmap is specified, then it names a bitmap in the standard forms ... bitmap is passed to the window manager to be displayed in window's ... icon, and the command returns an empty string. ...
    (comp.lang.tcl)
  • problems with Shell_NotifyIcon
    ... I found the Shell_NotifyIcon command and I've ... Once my icon has been added to the tray, ... create a window to receive notification messages. ...
    (microsoft.public.win32.programmer.ui)