I've been having trouble setting the window title using wm-title, apparently because ltk was never creating "." as the widget path.
I patched it as follows:
(defmethod wm-title ((w widget) title) (format-wish "wm title ~a {~a}" (if (master w) (widget-path w) ".") title) w)
which seems to work. It wasn't clear to me whether this is the right fix if one has multiple top level windows, and I didn't know whether a similar fix should be applied to other wm- functions. Can you advise? Jud
Hello:
I always use (setq *wish-args* (list "-name" ApplicationName)). For toplevels I remember there is a title or name paramether to use when invoke make-instance 'toplevel.
Bye!
2008/12/18 Jud Leonard leonard@tlw.com
I've been having trouble setting the window title using wm-title, apparently because ltk was never creating "." as the widget path.
I patched it as follows:
(defmethod wm-title ((w widget) title) (format-wish "wm title ~a {~a}" (if (master w) (widget-path w) ".") title) w)
which seems to work. It wasn't clear to me whether this is the right fix if one has multiple top level windows, and I didn't know whether a similar fix should be applied to other wm- functions. Can you advise? Jud
ltk-user site list ltk-user@common-lisp.net http://common-lisp.net/mailman/listinfo/ltk-user
Hello Jud,
I have no problems setting the window title both of the default and of new created toplevel windows, e.g. using the code:
(with-ltk () (wm-title *tk* "First window") (wm-title (make-instance 'toplevel) "Second window"))
Can you try the code, and if it does not work, the error message and your LTk version?
Peter