ltk

Problems with ltk (common lisp)

巧了我就是萌 提交于 2019-12-12 10:38:59
问题 I installed ltk to Steel Bank Common Lisp with asdf-install, but I can't even start using it V_V. The code below is the simplest example in the documentation, and is copied almost verbatim. (asdf:operate 'asdf:load-op :ltk) (defun hello-1() (with-ltk () (let ((b (make-instance 'button :master nil :text "Press Me" :command (lambda () (format t "Hello World!~&"))))) (pack b)))) (hello-1) This is the error message I get from sbcl: > ; in: LAMBDA NIL ; (PACK B) ; ; caught STYLE-WARNING: ;

LTK button height not configurable

强颜欢笑 提交于 2019-12-11 12:13:20
问题 I'm using LTK for basic windows in Common Lisp. I want to create a square button, but it turns out that height can't be changed. Here's the relevant part of the code: (let ((tile (make-instance 'button :width 20 :height 20)))) I'm getting an error: Invalid initialization argument: :HEIGHT in call for class #<STANDARD-CLASS LTK:BUTTON>. See also: The ANSI Standard, Section 7.1.2 [Condition of type INITARG-ERROR] In the LTK documentation, height is listed as configurable for buttons. Is there

Common Lisp mouse position with ltk

元气小坏坏 提交于 2019-12-10 13:44:11
问题 I'm making a simple applet in Common Lisp and I want to control it using mouse movement. I use LTK for the window. I couldn't find any function that would retrieve the mouse location. For example, Emacs Lisp has (mouse-pixel-position). I found this on rosetta code, but there's no Common Lisp entry. What can I do? 回答1: Hints from this SO answer: Mouse Position Python Tkinter and looking at ltk's doc: http://www.peter-herth.de/ltk/ltkdoc/node16.html I got the following example to retrieve any